Hi,
I'm trying to process a csv export file but have a bit of a problem. It's been exported in Excel csv format. When I view the file in Excel, it splits into its constituent columns just fine. However, when I look at the file using notepad there dont appear to any row terminators at all.
Reformatting the files as tab delimited makes the problem go away - but I've got many files > 65536 rows (the Excel maximum for 2003, which I'm working on).
Excel must have some way of determining the file structure, does anyone know hat it is?
Thanks, Iain
Example code:
I'm trying to process a csv export file but have a bit of a problem. It's been exported in Excel csv format. When I view the file in Excel, it splits into its constituent columns just fine. However, when I look at the file using notepad there dont appear to any row terminators at all.
Reformatting the files as tab delimited makes the problem go away - but I've got many files > 65536 rows (the Excel maximum for 2003, which I'm working on).
Excel must have some way of determining the file structure, does anyone know hat it is?
Thanks, Iain
Example code:
Code:
' open the error file
Open strFolderPath & fl.Name For Input As #1
' reset the counter
i = 0
' loop to the end of the file counting rows
Do Until EOF(1)
If i = 0 Then
' output the header row
[COLOR=red]this fails because the entire file is read in due to lack of row terminators[/color]
Line Input #1, strTest
Debug.Print fl.Name & ": " & strTest
Else
' just count the row
Input #1, strTest
End If
i = i + 1
Loop
' output the final result
Debug.Print fl.Name & " = " & i
Close #1