I'm trying to read in data from a text file (data is in column format) and store it in arrays. Is there any simple method to do it, or must I read in line by line and process each line character by character?
Printable View
I'm trying to read in data from a text file (data is in column format) and store it in arrays. Is there any simple method to do it, or must I read in line by line and process each line character by character?
you can read each line and then separate easily by the Split() command.
dim strData() as String
dim nData() as Integer
dim Line as String
dim i as Integer
...
read line string here into Line
...
strData=Split(Line," ")
ReDim nData(0 to UBound(strData))
for i=0 to UBound(strData)
nData(i)=strData(i)
next i
This code might need some small fixes because i didn't check it...
----------
The @host is everywhere!
----------