Weird Problem with ReadAll method
Hi,
I wrote a simple function to read data from a text file:
Dim buffer as string
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(filename, ForReading, -2)
buffer = f.Readall
f.Close
The weird thing is an extra newline character for every row of data is always added for no apparent reason. Example:
Source File:
123456
1234567890
Buffer: "123456nn1234567890" where n=newline character
Anybody know why?
Any input is greatly appreciated!
Rgs
WT
Re: Weird Problem with ReadAll method
Sorry, make a mistake, it problem should be extra space padded for every row of data.
Source:
123456
1234567890
buffer: "123456ns1234567890" where n=newline s=whitespace
Sorry about that.
WT