TextStream.ReadLine Mac Newline

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top