I need to export data from Excel into a txt file, the text file is used to update my websites database. I have done this on my fiends PC like this:
1) Copying all the cells 2) Opening a new text file - using notepad 3) Paste the lot into notepad
On my Mac I do this and the first Excel row is OK but after that I have new line characters causing line breaks. This causes my products import to fail. It is as if word wrap was on or I had set the column width in Outlook (you know how emails look when a column width is set.
What are you using for the "notepad" on the Mac? Could you simply "Save As.." from Excel? What format do the data need to be in? Since you are using notepad, I assume this is a Windows server? It should have a carriage return and line feed to distinguish lines. You have either a carriage return OR a line feed when you use something on a Mac (depends on what app you are using). Use BBedit or BBedit Lite on the Mac and choose "DOS" file format.
Mac OS X is schizophrenic when it comes to line endings. Mac apps like Excel use carriage returns like Mac OS 9 (ASCII: 13), but Unix tools like Apache, PHP, etc., recognize line feeds like Unix does (ASCII: 10).
(FYI, Windows uses both: CR then LF. This sometimes ends up looking like "extra" line breaks.)
As the other poster mentioned, BBEdit is a great tool to fix this. Should be just: open the file and save it, choosing Options...Line Breaks...<desired platform>.
Agreed 100% - BBEdit is a must and fixes all these little problems. However, if you save the Excel file through Excel on Mac as tab delimited text file, all the line breaks are allready ok so you won't need BBEdit (sigh).
(Just ignore the Excel message that all formatting will be lost. You know this - you want this. With these silly Excel alerts, just always remember Excel is a MS product so it always asks you if you really want to do what you want to do. :P)