E
Erazmus
Hi Guys,
Does anyone know how I would check that each line of a text file is
terminated with a CR/LF pair?
My macro needs to check the formatting of each line of a CSV file to
make sure it will load properly into a different application (This
part is nice and easy). Because each record/line in the file is
transactional in nature Excel is perfect for this but the one quirky
thing is that each line in the file must be terminated with a CR/LF
pair.
Any help will be appreciated.
I've tried working with something like this but each method reads the
line before termination? -
....
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile("C:\TEST.TXT", ForReading, TristateTrue)
currentLine = f.ReadLine
....
and also
....
Open "C:\TEST.TXT" For Binary As #1
Line Input #1, LineofText
....
Cheers,
Deon Murtagh
Does anyone know how I would check that each line of a text file is
terminated with a CR/LF pair?
My macro needs to check the formatting of each line of a CSV file to
make sure it will load properly into a different application (This
part is nice and easy). Because each record/line in the file is
transactional in nature Excel is perfect for this but the one quirky
thing is that each line in the file must be terminated with a CR/LF
pair.
Any help will be appreciated.
I've tried working with something like this but each method reads the
line before termination? -
....
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile("C:\TEST.TXT", ForReading, TristateTrue)
currentLine = f.ReadLine
....
and also
....
Open "C:\TEST.TXT" For Binary As #1
Line Input #1, LineofText
....
Cheers,
Deon Murtagh