Defect #7039
closedCSV export. Line breaks. Excel
Added by John Yani almost 14 years ago. Updated over 9 years ago.
0%
Description
When I make csv export of issues and open the result in Excel, line breaks (CR/LF) in description field are not correctly displayed.
Files
Classeur1.csv (64 Bytes) Classeur1.csv | Example CSV file | Etienne Massip, 2011-03-22 17:30 | |
csv_issue_description_eol.patch (604 Bytes) csv_issue_description_eol.patch | IssueHelper change | Etienne Massip, 2011-03-26 16:34 | |
csv_text_fields_eol.patch (1.31 KB) csv_text_fields_eol.patch | FasterCSV change | Etienne Massip, 2011-03-26 16:34 | |
Classeur1.csv (66 Bytes) Classeur1.csv | CSV with CRLF in a cell | Jean-Philippe Lang, 2011-03-27 19:39 | |
excel2007.png (2.2 KB) excel2007.png | Display in Excel 2007 | Jean-Philippe Lang, 2011-03-27 19:39 | |
excel2010.png (3.05 KB) excel2010.png | Rolf Stetter, 2011-04-28 17:58 | ||
faster_csv.rb.patch (2.58 KB) faster_csv.rb.patch | Patch that doesn't work | Sven Müller, 2011-09-09 15:42 |
Related issues
Updated by John Yani almost 14 years ago
Open Office Calc BTW handles it fine.
Excel version: 2007
Updated by Jonas Schulz almost 14 years ago
Please review this bug, it is still open in version 1.1. The CR/LF issue in the description field will prevent the correct import under excel 07.
Are there any other chance to drop out that field without modification of the issues_helper.rb?
Thank you in advance!
Updated by Etienne Massip almost 14 years ago
- Category set to Issues
- Affected version (unused) set to 1.1.0
- Affected version set to 1.1.0
Updated by Etienne Massip over 13 years ago
- File Classeur1.csv Classeur1.csv added
- cell content is surrounded by quotes
- line breaks are LF only
Here's an example (separator is semi-colon).
Updated by Etienne Massip over 13 years ago
- Target version set to Candidate for next major release
Updated by Etienne Massip over 13 years ago
- File csv_issue_description_eol.patch csv_issue_description_eol.patch added
- File csv_text_fields_eol.patch csv_text_fields_eol.patch added
- either simply replace \r\n EOLs with \n in issue description (
IssueHelper
change) - or replace \r\n EOLs with \n in all text fields (
FasterCSV
change)
Updated by Jean-Philippe Lang over 13 years ago
- File Classeur1.csv Classeur1.csv added
- File excel2007.png excel2007.png added
Works fine for me with Excel 2007. The same file with CRLF and what it gives in Excel 2007:
Updated by Etienne Massip over 13 years ago
Gosh, right.
Excel 2003 renders the \r with a square character inside the cell :/
So that's basically an Excel version support question...
Updated by Etienne Massip over 13 years ago
Jonas, could you post a sample of a non-working Excel 2007 workbook, please ?
Updated by Etienne Massip over 13 years ago
- Target version deleted (
Candidate for next major release)
Updated by Rolf Stetter over 13 years ago
- File excel2010.png excel2010.png added
Jean Philippe,
this is the result with Excel 2010 when opening your sample CSV:
Updated by Rolf Stetter over 13 years ago
ups.. you are right!
So, I am very interested in getting your fix released..
Don't want to start patching.
Updated by Etienne Massip over 13 years ago
This issue should probably be closed as a "Won't fix" since Excel >= 2007 opens Redmine exported CSV files containing EOLs just fine and supporting old Excel 2003 seems quite unnecessary now.
My patch simply replace CRLF inside column data with LF so it can be opened with Excel 2003.
Updated by Sven Müller about 13 years ago
In german Wikipedia there is a hint:
Trennzeichen ist stillschweigend Semikolon, wenn die CSV Datei nach ANSI-Norm gespeichert ist
Trennzeichen ist stillschweigend Tabulator, wenn die CSV Datei in Unicode-Format gespeichert ist
The delimiter semicolon
is expected when file is in ANSI.
The delimiter TAB
is expected when file is in Unicode.
So is there a way to configure Redmine, to select eigther comma
or semicolon
for cvs files?
Updated by Sven Müller about 13 years ago
- File faster_csv.rb.patch faster_csv.rb.patch added
I#ve tried to path one file. But in exported.csv are still comma
Any idea why?
Updated by Etienne Massip about 13 years ago
Sven Müller wrote:
I#ve tried to path one file. But in exported.csv are still
comma
Any idea why?
Did you read the issue description?
Updated by Ikon Ikon almost 12 years ago
Hello guys,
still problems for me in Excel 2010. You need to do this:
*Use ";" to separate fields (column separator)
*Use CR+LF for line break out of text fields (row separator)
*Use LF for line break inside text fields (these are line breaks that will break cell text on multiple lines)
In that case, Excel will be happy. Tell me please the script to edit in order to fix the bug.
Thanks!
Updated by Sergey Prosin almost 12 years ago
Hi, lkon.
To fix column separator you could edit your regional settings in folder \config\locales. Keep in mind the language you use in interface. Tha name of parameter is general_csv_separator. I'm not a redmine expert ;) so I'm not informed about solutions of line breaks, but may be you could find somethind in these files too.
Updated by Doan Phuoc almost 11 years ago
Hi all,
I used redmine 2.3.3 and i can't fix it. May be help me.
I want export csv whith vietnamese language.
Thanks
Updated by Toshi MARUYAMA over 9 years ago
- Status changed from New to Closed
- Resolution set to Wont fix
Etienne Massip wrote:
This issue should probably be closed as a "Won't fix" since Excel >= 2007 opens Redmine exported CSV files containing EOLs just fine and supporting old Excel 2003 seems quite unnecessary now.
I agree.
CSV character encoding in this issue is duplicate of #11116.