homepage Welcome to WebmasterWorld Guest from 54.83.133.189
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Website
Visit PubCon.com
Home / Forums Index / WebmasterWorld / The Macintosh Webmaster
Forum Library, Charter, Moderators: travelin cat

The Macintosh Webmaster Forum

    
Carriage return problem - need to import into website
Excel data has extra new line characters
ecommerce man




msg:975507
 5:19 pm on Nov 26, 2003 (gmt 0)

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.

Any suggestions?

Thanks for your help.

 

bodine




msg:975508
 11:07 pm on Nov 28, 2003 (gmt 0)

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.

timster




msg:975509
 6:42 pm on Dec 1, 2003 (gmt 0)

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>.

Yidaki




msg:975510
 8:24 pm on Dec 1, 2003 (gmt 0)

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)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / The Macintosh Webmaster
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved