Please help reading file

Could you pls provide an example?

see the Jukebox examle here App Inventor Extensions: File | Pura Vida Apps

What does "load file" mean?

If you only want to read it:

Thank you. But what if I have saved the file beforehand. What would be the "fileName" like?


The File component uses / needs the relative path.

See also here:

This might better show where I have problem with:

as already suggested

PS: the correct mime type for csv files would be text/csv

Yes, it made things a little better.

In that example (jukebox) you choose a random music file. But I dont want random selection; I want the file selected by user.

Returns this error:
Bad arguments to -
the arguments: , [239],[/storage/emulated/0/test_folder/number_1.csv]

what you could do is to use the FileList method to get a list of all csv files of a given directory
then display these files in a listpicker and let the user select a csv file

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Try this:

List is empty :cold_sweat:

Check your blocks. It works fine for me.
And post a test aia.

Of course, it should be csv in my blocks.

Check this aia: listCsv.aia (32.5 KB)

1 Like

It works, thank you.


what version of android do you have?

Anke suggested I should merge my question with this topic.
I have an App that I'm updating for Android 10 and 11. It uses external csv database files downloaded from a PC or the internet and changed frequently. The App Inventor 'read' 'write' file functions now use the App-Specific Directory (ASD) and I don't know how to download external data files from my PC or internet to the ASD in my App Inventor App when Android 11 takes over.

I've looked at Ankes AIA, and EFile, and the FileTools function FileListAsync. I had also looked at CopyFile and Copy File Async as my App already has filters for CSV files.
What I don't understand is whether these FileTools functions will still work on external memory for phones that use Android 11 as it doesn't allow File read and write operations to external memory only to Application Specific Directories? How will one read external data files from non Android applications such as EXCEL?

I'd appreciate any advice, Thanks Peter

See here: