# Reading Excel Data From PlutoUI File Picker

**URL:** <https://discourse.julialang.org/t/reading-excel-data-from-plutoui-file-picker/77034>\
**Category:** Pluto\
**Created:** [February 24, 2022, 5:50pm UTC](https://discourse.julialang.org/t/reading-excel-data-from-plutoui-file-picker/77034 "2022-02-24T17:50:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nicks/32/34124_2.png) [@Nicks](https://discourse.julialang.org/u/Nicks)\
**Post date:** [February 24, 2022, 5:50pm UTC](https://discourse.julialang.org/t/reading-excel-data-from-plutoui-file-picker/77034/1 "2022-02-24T17:50:19Z")

</div>

I’m using a PlutoUI filepicker and for a CSV file I can read the data for CSV with CSV.File but I’m stumped at how to do this for a .xlsx file. Everything for reading .xlsx files seems to want a path but the the filepicker only returns the file name, not the full path so nothing finds the file.

I see the data there but I just can’t figure out how to read it. Any suggestions?

 ![image](https://global.discourse-cdn.com/julialang/original/3X/5/2/52fd8fe509aa06b6b760cdbd15399e6e094db15b.png)

---

<div class="post-metadata">

**Author:** ![feanor12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/feanor12/32/8212_2.png) [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Post date:** [February 24, 2022, 9:09pm UTC](https://discourse.julialang.org/t/reading-excel-data-from-plutoui-file-picker/77034/2 "2022-02-24T21:09:23Z")

</div>

The problem of the `FilePicker` is that it can’t provide the full file path due to restrictions set by the web browser.  
One possible solution would be to write the data into a temporary file and read that one by XLSX.  
Another way is to provide the full file path as a String. This can also be extended to multiple files using `readdir` and `PlutoUI.Select`.

I am not sure if it is possible to get a virtual file path to avoid the duplication of data.

---

<div class="post-metadata">

**Author:** ![Nicks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nicks/32/34124_2.png) [@Nicks](https://discourse.julialang.org/u/Nicks)\
**Post date:** [February 25, 2022, 1:17am UTC](https://discourse.julialang.org/t/reading-excel-data-from-plutoui-file-picker/77034/3 "2022-02-25T01:17:32Z")

</div>

Is there a default location for assets to house a temp file? Haven’t done this before. I don’t mind writing a temp I just don’t know where to write out so it is accessible and I’m not right back at the starting point.

---

<div class="post-metadata">

**Author:** ![feanor12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/feanor12/32/8212_2.png) [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Post date:** [February 25, 2022, 7:33am UTC](https://discourse.julialang.org/t/reading-excel-data-from-plutoui-file-picker/77034/4 "2022-02-25T07:33:07Z")

</div>

The are functions to create temporary files or folders called `tempname` and `mktemp`.

---

<div class="post-metadata">

**Author:** ![feanor12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/feanor12/32/8212_2.png) [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Post date:** [February 25, 2022, 10:24am UTC](https://discourse.julialang.org/t/reading-excel-data-from-plutoui-file-picker/77034/5 "2022-02-25T10:24:21Z")

</div>

For a long term solution maybe a PR to enable the use of an IOBuffer or UInt8 array for XLSX would be the best

---

<div class="post-metadata">

**Author:** ![Nicks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nicks/32/34124_2.png) [@Nicks](https://discourse.julialang.org/u/Nicks)\
**Post date:** [February 25, 2022, 8:56pm UTC](https://discourse.julialang.org/t/reading-excel-data-from-plutoui-file-picker/77034/6 "2022-02-25T20:56:29Z")

</div>

Thank you so much for your help. I ended up getting this to work:

![image](https://global.discourse-cdn.com/julialang/original/3X/d/4/d48ce0ff0f61d39dabaac59c2f2f859e63f4cea1.png)

First time using tempname. Glad to know of the functionality.
