MS Excel and line terminators

Joined
Apr 8, 2012
Messages
2
Reaction score
0
Points
1
Hi,

I've opened a text (tsv) file in excel, then saved it, and now my line terminators are screwed (they normally were 0x0A, but now they became 0x0a 0x0d). I can no longer work with this file in console :(

Is there any way to say MS Excel to preserve 0x0a when saving text files, which is default osx line terminator?
 
Joined
Mar 30, 2004
Messages
4,744
Reaction score
381
Points
83
Location
USA
Your Mac's Specs
12" Apple PowerBook G4 (1.5GHz)
Are you sure you don't mean 0x0D0A? Excel, being a Microsoft program, will naturally export to MS DOS/Windows line endings (CR+LF, or 0x0D0A)

I very much doubt there's any way to convince Excel to change its behavior, but it should be a simple matter to strip out the line endings using the sed command, or your favorite editor.
 
OP
V
Joined
Apr 8, 2012
Messages
2
Reaction score
0
Points
1
Are you sure you don't mean 0x0D0A? Excel, being a Microsoft program, will naturally export to MS DOS/Windows line endings (CR+LF, or 0x0D0A)

I very much doubt there's any way to convince Excel to change its behavior, but it should be a simple matter to strip out the line endings using the sed command, or your favorite editor.

Thanks, technologist, you must be right on 0x0D0A. But the order doesn't really matter in this case, but rather the presence of '0D', which screws things up.

I wonder what kind of 'bad ***' one needs to be, to output text files in *UNIX* version of the software with hard coded *Windows* line terminators??? :Lips-Are-Sealed:

Oh, well :) Regarding using `sed`, yes, this is possible of course, but too much trouble.. I'd better use OpenOffice for this particular task, which manages it beautifully.
 
Joined
Mar 30, 2004
Messages
4,744
Reaction score
381
Points
83
Location
USA
Your Mac's Specs
12" Apple PowerBook G4 (1.5GHz)
Regarding using `sed`, yes, this is possible of course, but too much trouble.. I'd better use OpenOffice for this particular task, which manages it beautifully.

Can't argue with that.:)
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top