Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Save Excel as tab delimited

Posted on 2014-12-03
5
313 Views
Last Modified: 2014-12-11
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
0
Comment
Question by:Richard Korts
5 Comments
 
LVL 53

Accepted Solution

by:
strung earned 500 total points
ID: 40479019
The problem is likely the difference between Mac and Windows line breaks.

Mac uses an ASCII "carriage return" at the end of each line.
Windows uses an ASCII "carriage return" plus an ASCII "line feed" at the end of each line.

When Excel on a Mac is saved as Tab Delimited it uses only carriage returns for the line breaks, no line feeds.

This can be solved at the Mac end if the user then opens the Tab Delimited file in the freeware TextWrangler ( http://www.barebones.com/products/textwrangler/download.html ), then does a "save as" choosing "Windows (CRLF)" in the save as dialogue box for the "Line Breaks" option. This saved file should then have the proper Windows line breaks.
0
 
LVL 53

Expert Comment

by:strung
ID: 40479034
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.
0
 

Author Comment

by:Richard Korts
ID: 40479071
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.
0
 
LVL 29

Expert Comment

by:serialband
ID: 40479721
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/
0
 
LVL 12

Expert Comment

by:tel2
ID: 40479888
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
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question