Ask Your Question
0

Calc export to CSV with CRLF line breaks

asked 2016-12-15 02:25:44 +0200

Random_Adam gravatar image

updated 2016-12-15 02:27:59 +0200

I'm sure someone has answered this somewhere but I can't find it.

I would like to use LO more extensively; rather then installing MS office using Wine.

One thing really holding me back is getting LO Calc to save as CSV files that are exactly the same as Excel CSV files. Looking at a very basic Excel CSV using a hex editor shows the line endings are CRLF (0D 0A) whereas Calc created CSV files the line endings are simply LF (0A).

I work with programs that simply will not import data without the CRLF line endings. If it was only a few files I could just use a Hex editor to find-replace LF to CRLF; but I would be doing this 10 to 20 times a day and thus it is a huge time waste. Thus I am currently stuck with Excel. I realise there are no "hard" CSV standards thus the mess; but this is a major frustration for me.

If anyone has a simple solution I would love to hear it. It would be great if I could have a button on the tool bar that was basically export sheet to "Excel CSV".

edit retag flag offensive close merge delete

Comments

Hi @Random_Adam - What is your platform? On my windows 7 & LibO 5.2 CSV are created with CRLF

Regards

pierre-yves samyn gravatar imagepierre-yves samyn ( 2016-12-15 12:01:43 +0200 )edit

I use Ubuntu thus the Linux line endings. LibO 5.1.4

What format are you saving your CSV in? The "standard" CSV file is saved as Unicode UTF-8 on Ubuntu.

Random_Adam gravatar imageRandom_Adam ( 2016-12-15 23:54:13 +0200 )edit

As you say it depends on system and not encoding set: on my platform, CRLF is generated whatever the encoding set (windows 1252 or Utf-8).

Sorry, I can not test these days in a linux environment

pierre-yves samyn gravatar imagepierre-yves samyn ( 2016-12-16 09:17:21 +0200 )edit

@pierre-yves_samyn: http://virtualbox.org/

rautamiekka gravatar imagerautamiekka ( 2016-12-17 17:50:30 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-12-15 11:43:57 +0200

You can change the field and text delimiters used when exporting to CSV, if in the Save as... window you check the Edit filter settings checkbox when you select Text CSV (*.csv) in the file type combobox.

When you press Save button, a new window will appear to set the exact delimiters you want to use.

I don't know if changing those settings will help with the line endings.

edit flag offensive delete link more

Comments

I have tried that and the line endings don't change.

I have also tried changing the CSV type I thought the "Western Europe (ASCII/US)" was the one that would change to the Windows line endings, but either it doesn't change since when I re-open the file it is always still encoded as UTF-8 or they are the same and it makes no difference which one you choose.

As a side note there is no selection for the RFC 4180 standard; which is apparently what Excel considers a CSV file to be.

Random_Adam gravatar imageRandom_Adam ( 2016-12-15 19:44:46 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-12-15 02:25:44 +0200

Seen: 1,988 times

Last updated: Dec 15 '16