M
mike.biang
I am using the textstream object to read a CSV file and parse through
the fields. I use the readline() method to read in each line of the
file, and parse the contents into the values of the different fields.
With files generated on a windows system, this works fine.
However, when working with CSV files genereated through Excel on a Mac,
the entire contents of the file is read when I make the first ReadLine
call. I imagine that this is because Mac uses a different newline
character than windows machines do (Carraige Return vc Carraige Return
+ Line Feed). I'm theorizing that ReadLine doesn't recognize just the
Carraige Return generated by a Mac.
Has anyone encountered an issue like this, or does anyone know of any
work arounds?
Thanks!
Mike Biang
mike -at- cramerdev dot com
the fields. I use the readline() method to read in each line of the
file, and parse the contents into the values of the different fields.
With files generated on a windows system, this works fine.
However, when working with CSV files genereated through Excel on a Mac,
the entire contents of the file is read when I make the first ReadLine
call. I imagine that this is because Mac uses a different newline
character than windows machines do (Carraige Return vc Carraige Return
+ Line Feed). I'm theorizing that ReadLine doesn't recognize just the
Carraige Return generated by a Mac.
Has anyone encountered an issue like this, or does anyone know of any
work arounds?
Thanks!
Mike Biang
mike -at- cramerdev dot com