Hello all. I am very new to VB.Net and am currently learning the basics and mechanics of how the software functions, my past was mainly with Matlab, so naming variables and such is quite different to me now.

My question is this: How can I read data from a .csv file I have opened into a variable for later use (i.e. plotting with zedgraph)? My csv file contains 100+ columns and 12000+ rows of data, with each column a different variable.

I've searched around a ton on this subject, and combined many methods I found on the net to my project but none actually do what I am required to do.

So, I apologize in advance if this seems really fundamental! Any help would be much appreciated!!!!

Hi,

There are a couple of ways to do this one is to read each line in using filesystemObject or system.io.

Another is to open an excel object and read the csv file in you can then interact with it as if it were a database and even query it. My main concern would be the amount of data you have, I'm not sure if Excel will be able to handle it.

G Waddell, thanks for your reply. I actually used StreamReader then read line by line and then used Split to cut all of the data up.

Now my problem is getting the data into an array.

Thanks again for your help!

Hi,

If you've used split then you already have an array (or in this case, a row of your array)

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.