How can i read data from a specific file in a specific dir?

Hi!
I want to read a csv file that i previously saved. After save i moved it to a specific dir. Lets call it /Mydir.
Do i need permission? I already asked for write external storage for save. As i know it grants read too.
I know there is some parade about only ASD can be used for this task or something like that from android version 11 too, but is that cause the problem? If i use legacy mode that will be obsolote at some point, isnt it?
I use the File block now. Can it be achieved (with an extension if nothing else) without moving/copying the file to somewhere?
This is what i tried to use:

For a start it should be

/Mydir/

Where?

  • How?
  • to what dir?
  • and with which name?

So show all (relevant) blocks.

You are right. The mistake was in the move block. I accidentally made a dir with the filename with Taifun file extension move method. I viewed it before with a file explorer, but in the meantime i was a phone call so i missed it.

Gomething is not good yet. Now it is not give the file not found error, but somehow i cant get the saved data back. Still testing, and make some png from my blocks.

Ok. I got the problem, The csv from list and list from csv not 1:1 compatible. Need the separation procedure by all means.

I'm not entirely sure if this is the right place for self-talk. :wink:
So, when you found the solution yourself, share it with the community. Otherwise, ask a question when you're really stuck. But then post all relevant blocks.

1 Like

Ok, but i was about finding the problem.
My original question is obsolote, it was a mistype in blocks.
Now my problem is to export a 2-dimension list and import back. I thought it will be simple by csv export and import, but it is not. Not that i have to manage the 2-dimension myself, but seems the CSV from table and CSV from text blocks are BUGGY. They create a weird csv. The first item is simple and the others are in quotation marks. In the case of table every first item of the rows are simple, and the followings are in quotation marks. Hard to make a separation for this. Need multiple steps.
If i dont use the CSV blocks then the list members is exported in parentheses. But the first and the last is double and the inners are backside each other.
So this is what i got vithout CSV: ((0 255 174 0) (0 255 174 0) (0 255 174 0) (0 255 174 0) (0 255 174 0))
This is with CSV row: (21 0 255 0),"(21 0 255 0)","(21 0 255 0)","(21 0 255 0)"
CSV table is similar but in every row is like this.
So what is the solution?
Any extension can export a normal CSV?

More likely, you are flattening your lists into text at some point, hence the ( ) wrappers appearing.

No. The wrappers are the dimension borders. As i sad it is a list of lists.
Here is the save block:


But the problem is not that. Look the CSV order.
Ok, lets say it cannot handle the double list. BUT, Why the first is not in quotation marks only the others?
I cannot make a simple separator. Need a ),"( and a )","( and i guess it is the same without the parentheses. And the there still remains a quotation at the end of the last item.

Your ( ) problem is coming from upstream, in global ColorList, and a possible mismatch between expectations of row vs table when you try to turn it into Comma Separated Values.

Yes, probably you are right, but if i want to make it to table it is not different. only in rows the same. I made peace with () coming from the double list. But the inconsistent "" is the problem.

There is no such thing as a two dimensional row.
In AI2 it is called a table.
The conversion block should be
csv from table.

I understand. But doesnt matter what you call it. As i said it desnt work either. The inconsistent "" is there also.
Loook: It is generated with table block.allorange[1].csv (2.9 KB)

Your data:

"17","255","0","0"
"17","255","0","0"
"17","255","0","0"
"17","255","0","0"
"17","255","0","0"
"17","255","0","0"
"17","255","0","0"
"17","255","0","0"
"17","255","0","0"
"17","255","0","0"
"17","255","0","0"
"17","255","0","0"
"17","255","0","0"
"17","255","0","0"
"17","255","0","0"
"17","255","0","0"

If this all numbers, you can use a custom csv_from_table procedure to generate it without quotes.

Give me a moment ...
(Tool offer withdrawn, it would not help here - ABG)

Interesting. I opened it with MS excell. That didn't show the first quotation marks.
The android really shows it. Now placed back the blocks seems works, but i make some more testing.

The quotes are a necessary part of the packaging, to guard against mis-interpretation of internal commas and blanks within text cells.
Decent programs like Excel and the AI2 csv to table block see them and remove them in import as they build their internal list structures.

For you yet not thousands of others?

Seems woks now. Thank you!
I thought it is not working because i seen this in my MS:
Capture
But thank you again.

@ChrisWard Why dou you say that? I didn't post lot of things as BUG. I asked many things, but 3 or 4 things was that i thought is a BUG, and there really was 1 or 2 .

How did you import the csv data into your spreadsheet?
Did you just highlight it and do a keyboard copy-paste from window to window?

I ask because it is not supposed to be all in column A if it were imported properly by a File->Import from csv dialog option.