Converting an excel doc to a csv format that Mac OSX can be a pain in the ass every once in a while. For those of you who have issues, I have found the solution!
Line parsing. Mac apps (like Excel and Textmate, etc) read and write line endings as carriage returns. Terminal/unix programs read and write line endings as line feeds.
Line feed is represented as: \n 10 (ascii ordinal value) 0xa (hex)
Carriage return is represented as: \r 13 (ascii ordinal value) 0xd
Luckily, this isn’t that complicated. Basically, you need to convert \r to \n, and there a several ways to do this.
dos2unix - a terminal program that comes with a whole set of tools to basically automate the above code
Assuming you have dos2unix installed: