Activity starter edit a csv file

hello
i am using this example https://puravidaapps.com/pick.php to open a csv file where i give it its path to uri using tifun extension.
the file is opening but the problem is the file is opening in read only mode where i can’t edit in it
i trie to change android.intent.action.VIEW to android.intent.action.EDIT
but still the same problem .
thank you

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.

Taifun


this is the blocks related to activity starter i am opening a specific csv file in my device it is opening but only in Read Mode, editing is forbidden

the blocks look reasonable… which app do you open to edit the text file?
and why don’t you use the file component of App Inventor to read the file and edit it using a textbox component?

Taifun


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

I tried with different apps google sheets , wps office and polaris all of them did’t allowed me to edit the file unless i edit and save another copy of the file with the edited info.
My file is csv so i want to be organised and to edit with edit in a csv reader app

So is there any solution @Taifun ?

csv is just plain text file, read it with file component, and set it to a textbox. Save the text with file component after edit.

@Kevinkun putting the csv file which is organised as rows and column in a textbox will make the organising bad where the user will have dificulty in editing file since it has many rows and columns.
I just want to know why the app is opening file in read mode only is there any idea to solve that?

Doing it fancy requires more work than doing it lazy.

Here’s a base project you can adapt into a table editor, if you put the work into it.

You would need to change the focus management to row and column numbers instead of dates, add csv to table conversion, add vertical and horizontal window movement, and add row and column headers to show context in the table.

At least you will have a starter grid of buttons work from.

Have fun!

You could also use this: https://puravidaapps.com/editable.php

Perhaps instead of doing the editing with an ActivityStarter you could:

Download the csv and load it into the app.
Create a List from the csv
Edit the List within the app (this is easy)
Save the edited List as a csv.

why the app is opening file in read mode only is there any idea to solve that?" The csv probably has read only associated with it. You might read android remove read only restriction on a downloaded file for ideas.

Without an example of your actual file, we don’t know

my suggestion is to use the file component to read the csv file, convert it into a list of lists using the list from csv table block and display the table in a table format, see here

App Inventor and editable(!) dynamic table layout with any number of rows and columns

after editing, use the list to csv table block to convert it back to csv format and use again the file component to store it as file

Taifun


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