Hello,
Im trying to read a CSV into a 2d array, where the rows of CSV are the rows of the array, and the columns are defined by the separating commas in the file. It will be a rectangular array.
any help would be ace!
thankys
princesssuperst
0
Newbie Poster
Recommended Answers
Jump to PostYou can read the file contents in line by line then use string.Split() to convert each row into a string array.
The following works provided that the array definitely has the same number of rows as columns:string filePath = @"C:\Users\Dan\Documents\test.txt"; StreamReader sr = new StreamReader(filePath); string[,] …
All 3 Replies
Geekitygeek
480
Nearly a Posting Virtuoso
Member 785500
0
Newbie Poster
Member 785500
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.