Calc export to CSV with CRLF line breaks

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”.

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

Regards

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.

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: http://virtualbox.org/

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.

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.