open_file
open_file copied to clipboard
is there any way to open .csv file?
this is the code. OpenFile.open("/storage/emulated/0/Android/data/com.xyz.abc/files/123.csv"); However i am able to open the same file from file explorer but getting alert message of corrupt csv file when i use the above code to open. i tried passing type and uti as well but nothing worked.
when calling OpenFile.open, whether to open it with the same third-party app as file explorer
I'm assuming you're trying to open the CSV with the Google Sheets app.
Try to assign the "type" and "uti" like the following:
await OpenFile.open(
value,
type: 'text/csv',
uti: 'public.comma-separated-values-text',
);
This did it for me at least. Try it out :)