Link to home
Start Free TrialLog in
Avatar of Richard Korts
Richard KortsFlag for United States of America

asked on

Save Excel as tab delimited

We have an excel spreadsheet that we save as a tab delimited (.txt) file for subsequent uploading to a web server for loading into a web database table.

I have done this for years; seems to function correctly using a Windows (7 or XP) PC.

A current customer uses a Mac. When they save an Excel sheet as tab delimited, there are no line breaks between the rows so the entire sheet is one massive blob. Of course, the web upload fails.

Is there an option one must use on the Mac to make it work like it does on a PC?

Note I DO NOT have a Mac, I am taking this from the customer, they emailed me the file & it was like I indicated.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of strung
strung
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Although I haven't tried it, I am told that if you set your FTP program to upload a text file as "ASCII" instead of "Binary",  it will change the line breaks automatically. You might give that a try.
Avatar of Richard Korts

ASKER

To strung,

Thanks.

The process uses php programs to do the upload, so there is no ftp involved (directly). The file is specified in a "file" input element on an html page.

I might be able to get the customer to do TextWrangler thing.
Avatar of serialband
You can also do it yourself on Windows with tofrodos.

http://www.thefreecountry.com/tofrodos/

Here's the sourceforge site link to the zip file  http://tofrodos.sourceforge.net/download/tfd1713.zip


You can also download the mac2dos, unix2dos, dos2mac, unix2mac programs to install on your Windows system to run them in your DOS Prompt or PowerShell:  http://sourceforge.net/projects/cs-cmdtools/files/
Hi rkorts,

If changing the web server's PHP process is an option for you, then that might be the best long term, as it will save your (current and any future) Mac customers from having to do extra processing at their end, which is just a hassle for them.

So, I would suggest you change the PHP process so that after the file is uploaded, it automatically converts all the files into the same format before it continues with the process.  You could either:
a) Leave the Mac/Linux (LF line terminator) files as is, change all DOS/Windows (CR-LF line terminators) versions to LF only, then change your processing to accept LF line-terminators.
Or probably more simply:
b) Just change the Mac/Linux (LF line terminator) files to the DOS/Windows (CR-LF line terminators) style.

Another option is:
c) Just change the final processing so it accepts files with both types of line terminator.

tel2