0

.csv file handling

I can't figure out how to read .csv files, show lines and store the data into arrays

5th Mar 2017, 9:02 PM
Ditshego Mosotho
Ditshego Mosotho - avatar
1 Odpowiedź
+ 2
you shold define the delimiters of your CSV file: for example " , " for column and" ; " for end of line. you can store the data in a multidimensional array. Read the CSV file content char by char. When you find a " , "'store the readdata in the array and increase the horizontal index. dataArray[0][1] increase the verical and reset to 0 the horizontal indexwhen you find a " ; " dataArray[1][0]
5th Mar 2017, 9:30 PM
seamiki
seamiki - avatar