-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/newlines in cells #114
Conversation
resolves #91 |
Excellent! |
It opens correctly in OpenOffice, but in Excel it translates new line as new row. It breaks all displayed data (can't correctly figure out that newline char is within " " and shouldn't create new row). I reverted to |
@grimor http://superuser.com/a/73851/209612 are you sure it's not an issue with your version of Excel? |
Ok, even if it's possible to create new lines, it doesn't get imported correctly for me (Excel 2010). It converts new lines intro new row (as CSV contains each row in new line). It doesn't parse that it's between double quotes/ |
@dbuentello what version of Excel do you have? |
Excel 2015 for Mac, also tested on Windows with Excel 2016 |
@grimor can you run code below and upload csv
|
Hey, I'm using Excel 2010 and have the same issue. The only solution was to downgrade to 3.4.2 @dbuentello
I tried to generate a multi-line CSV in Excel and I've found out, that Excel uses different characters to determine normal (row) line break and a multi-line cell line break. |
Good catch! So the split needs to be more specific it seems. |
This reverts commit a8c63f4. Conflicts: test/helpers/load-fixtures.js test/index.js
I've reverted this PR in 3.5.1 |
Issue: Newlines are not preserved within a cell's content.
Cause: JSON.stringify escapes
\n
and you end up\\n
instead.Fix: Replace occurrences of
\\n
with\n
in thestringifiedElement
(before the row delimiter).Includes appropriate tests