Read CSV file in shared Documents foder

I read from tinydb database and I want to save in csv format on documents folder

SAF doesn’t work with file paths.
You need to open saf picker dialog and ask user to give your app access to Document dir. Only then you can create an empty document (not file ) there.

I differ.

Ok I first created the file and it works but now if I try to write inside the file it doesn’t work. It doesn’t give me any error but it doesn’t write anything on the created file. Any indication?

Hi Sunny and all

I tried to import a text file but app crashed.
Did I enter the dirUri and uriString correctly?

Definitely no.
You are entering file path whereas SAF works with uri.

Can you advise the correct entries for dirUri and uriString?

First you prompt user to select a file using OpenSingleDocument block.
After selection you get file uri in GotUri block. This uri can be used for reading.
Examples are given in SAF thread.

Noted with thanks