-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Excel does not handle embedded new line characters well in CSV files …
…encoded with UTF-8, so remove them (see #10)
- Loading branch information
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
304ecac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is a good idea. You can enter a newline in an excel cell with
<alt><enter>
.304ecac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What you say is true. But you can't get that new line in there by importing it from a CSV file. The recognised way to do it is to embed the new line in double quotes. Indeed, if you import such a CSV into OpenOffice, you get what we want. Unfortunately, if you import it into Excel, what you get is a new row, and a big mess in the case of exported property files. So I have sacrificed some fidelity in the values for the sake of being able to open the exported CSV files in Excel with substantially correct results.