Open a file text file with data and parse

  • Thread starter Thread starter cmdolcet69
  • Start date Start date
C

cmdolcet69

How do i parse a text file with data value in it? I have a series of
values that are sepereated by commas. the file holds around 3700
values and all these values need to be parsed out and put into an
array to be used.
 
How do i parse a text file with data value in it? I have a series of
values that are sepereated by commas. the file holds around 3700
values and all these values need to be parsed out and put into an
array to be used.

Look up the StreamReader object, it's ReadXXX() methods, and
String.Split() method.

Thanks,

Seth Rowe
 
cmdolcet69 said:
How do i parse a text file with data value in it? I have a series of
values that are sepereated by commas. the file holds around 3700
values and all these values need to be parsed out and put into an
array to be used.

If you don't know exactly how many values there are, I suggest you put them
into an ArrayList instead because that will expand automatically.

You can always transfer the data from the ArrayList into an Array once you
know the size to Dim the array to.

Andrew
 
cm,

I thought this was answered before and my answer was, just use oledb with a
dataset and gave this website for the connection string, if you search this
newsgroup on google Paul Clement (or Cor) then you find plenty of stuff
about this.

www.connectionstrings.com


Cor
 
Back
Top