mrong
asked on
VBScript Skip blank spaces
Greeting,
I have the following code in my vbscript which split the txt file. Right now it only split by a blank space how to skip if there are more than one blank spaces in between?
Do While Not f.AtEndOfStream
line = f.Readline
columns = split(line, " ")
strColumn1 = columns(0)
strColumn2 = columns(1)
strColumn3 = columns(2)
Thanks.
I have the following code in my vbscript which split the txt file. Right now it only split by a blank space how to skip if there are more than one blank spaces in between?
Do While Not f.AtEndOfStream
line = f.Readline
columns = split(line, " ")
strColumn1 = columns(0)
strColumn2 = columns(1)
strColumn3 = columns(2)
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Do While Instr(strLine, " ") > 0
strLine = Replace(strLine, " ", " ")
Loop
arrNames = Split(strLine, " ")
strColumn1 = arrNames(0)
strColumn2 = arrNames(1)