L
L Mehl
Another application creates text files which I import into a worksheet for
further processing.
The text file looks like:
ARRAY 1 3023 <--3023 indicates how many X-values are in the file
#X-values, ...some more misc text ...
0.378228
0.737527
1.113739
1.488899
1.866231
2.257432
.... more X-values
<--one space in this line
#Y-values
0.195559
0.152420
0.126161
0.199365
0.173638
.... more Y-values
I need only the first 2 rows plus all the X-values (up to but not including
the line containing one space.
There could be 65,500+ X-values, and line-by-line processing is slow with
many values to import.
Is there a way in VBA to import a specified number of lines, without using a
line-by-line method?
expression.OpenText(...) has a StartRow parameter, but no "EndRow" as far as
I can tell.
Does anyone know of a text-file parsing program or a method which could be
used to write a program which could be called by VBA, to create a new file
after stripping the rows below and including the line containing one space?
Thanks for any help.
Larry Mehl
further processing.
The text file looks like:
ARRAY 1 3023 <--3023 indicates how many X-values are in the file
#X-values, ...some more misc text ...
0.378228
0.737527
1.113739
1.488899
1.866231
2.257432
.... more X-values
<--one space in this line
#Y-values
0.195559
0.152420
0.126161
0.199365
0.173638
.... more Y-values
I need only the first 2 rows plus all the X-values (up to but not including
the line containing one space.
There could be 65,500+ X-values, and line-by-line processing is slow with
many values to import.
Is there a way in VBA to import a specified number of lines, without using a
line-by-line method?
expression.OpenText(...) has a StartRow parameter, but no "EndRow" as far as
I can tell.
Does anyone know of a text-file parsing program or a method which could be
used to write a program which could be called by VBA, to create a new file
after stripping the rows below and including the line containing one space?
Thanks for any help.
Larry Mehl