handle=FileOpen(filename,FILE_CSV|FILE_READ); string holdingArray[14]; for (int i=0; i<ArraySize(holdingArray); i++) { holdingArray[i] = FileReadString(handle); if (FileIsEnding(handle)) break; } FileClose(handle);
Hello, thanks for this example of "reading a CSV file to an array".
I have tested it and see that it is based on the assumption, that we have a "one-dimensional Array".
I would like to read a CSV-file, which has a number of fields per line.
So I suppose this would be a "2-dimensional array".
I would be interested in an example for this case.
Thanks a lot in advance!!
Hello, I think I can take back my comment from above.
In fact, what I need is "Array of a structure".
In this case, the Array is still one-dimensional, but it has multiple "columns" with the fields that I want.
So I do not have a question anymore about "2 dimensional".
Tanks a lot in any case!!
You can use FileWriteArray() with an array of struct, if the struct is simple enough (no strings etc).

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
does any one can help me to do
i have two array , array A & array B
if i want to save array A data to csv then read from csv and to write to array B
how can i code it,thank you!
that is my code blow
thank you!