Reading multiple lines from a CSV file, each line having about 300 data values. There are @100 lines
I have been attempting to read a CSV file and populate an array of arrays. I'm using the functions, F_ROPEN, F_SEEK, FM_READ, F_EOF etc..
The different values of data(type = Dint) are separated by commas in the CSV file, with CR+ LF at the end of each line.
It looks like this
5255,0,12236,11927,12089,11803,10369,10524,12009,12517,15154,17671,20596,21825,22880...............Some 300 values......13622,14176,14814,14819,13507,12936,13378,\r\n
I find that each value of String read by FM_READ includes the whole line as a string with a limit of 255 characters. The commas are also included as part of the string!
Even if I use spaces or tabs, the same thing happens. FM_Read always returns a string of 255 characters, ignoring the separator values.
It looks like this ..
Kindly guide me how to insert a suitable suitable string terminating character so that each value is read independently as a separate string.
Thanks and regards
This is a migrated post! Originally posted on 09.05.2022 by user rajsiyer. Please be aware that information can be outdated.