Solved

Save Excel as tab delimited

Posted on 2014-12-03
5
327 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
[X]
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
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Re-order columns of data in Excel 3 54
Delete row if does not start with 0 43 37
Excel Named Range 31 44
Populating a Cell with specific Characters 13 14
In this article we have discussed about the OS X EI Capitan and how to fix Wi-Fi issue in OS X El Capitan. We have explained how to delete system level preferences and create a new Wi-Fi location to resolve Wi-Fi issue.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

735 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