Marisoleil
MIS
Hello,
I want to modify the following slightly so that intLineCount variables are not specified number values, but rather are numbers taken from the contents of a column of cells within a specific Excel workbook sheet. (The number of values (non-blank rows) in the column will be different each time the program is run).
How can I code for this, including the 'or' statements? (Do I need the 'or' statements still?)
Thank you,
Any help or suggestions is appreciated.
Marie
p.s. To set the scene a little more, a large number of text files exist already. A new text file has been created and has values parsed from old text files and then written to the new file, line by line. The new text file will have columns which are tab-separated, but the number of columns will depend on the number of rows in the Excel file.
I want to modify the following slightly so that intLineCount variables are not specified number values, but rather are numbers taken from the contents of a column of cells within a specific Excel workbook sheet. (The number of values (non-blank rows) in the column will be different each time the program is run).
How can I code for this, including the 'or' statements? (Do I need the 'or' statements still?)
Thank you,
Any help or suggestions is appreciated.
Marie
p.s. To set the scene a little more, a large number of text files exist already. A new text file has been created and has values parsed from old text files and then written to the new file, line by line. The new text file will have columns which are tab-separated, but the number of columns will depend on the number of rows in the Excel file.
Code:
intLineCount = 1
While Not (ObjUFile.AtEndOfStream Or ObjVFile.AtEndOfStream)
strLineU = ObjUFile.readLine ' first line indicates how many columns there are
strLineV = ObjVFile.readLine ' first line indicates how many columns there are
If (intLineCount = 45264 Or intLineCount = 45265) Then
u = CDbl(Trim(strLineU))
v = CDbl(Trim(strLineV))
mag = Sqr(u * u + v * v)
strTSLine = strTSLine & vbTab & mag ' Adds magnitude component to timestamp row, separated by tab from previous entry
End If
intLineCount = intLineCount + 1
Wend