-
Notifications
You must be signed in to change notification settings - Fork 362
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
Newlines are not created correctly #91
Comments
Same issue. |
@vroudge can you provide sample JSON data that is affected? |
|
@kayheunen what options are you running against that JSON? |
None, atm. I've tried newLine: "\n", newLine: "\n", newLine: '\n', newLine: '\n' and some others. |
All of the above are the same. |
Ah sorry, github didn't accept. take the double backslash and the double and single quotes. What do you propose to use, given the input in my first comment? |
single quotes and double quotes don't make a difference. Will look more into this. |
So what should I put as options? Given that I'm looking for |
@knownasilya is it an escaping issue? |
I think the issue is JSON.stringify escapes |
Released as v3.4.2 |
This was reverted in eb0bb6e Is there currently some way to work around this issue? Could this be reopen? |
Any news? |
We probably need an excel flag.. |
\n and \r are converted to \u2028 and \u2029 in order to pass through JSON.stringify, then converted back to \n and \r. Note any original \u2028 and \u2029 are converted to \n and \r.
\n and \r are converted to \u2028 and \u2029 in order to pass through JSON.stringify, then converted back to \n and \r. Note any original \u2028 and \u2029 are converted to \n and \r.
…rco#91) \n and \r are converted to \u2028 and \u2029 in order to pass through JSON.stringify, then converted back to \n and \r. Note any original \u2028 and \u2029 are converted to \n and \r.
…#91) (#171) * Preserve new lines in cells with option preserveNewLinesInCells (#91) \n and \r are converted to \u2028 and \u2029 in order to pass through JSON.stringify, then converted back to \n and \r. Note any original \u2028 and \u2029 are converted to \n and \r. * fixup! Preserve new lines in cells with option preserveNewLinesInCells (#91)
This feature is working for me. At least on Mac (I haven't tested on PC), I need to use a \r rather than \n for Excel to recognize it as a newline within a cell. What is the plan in terms of when this will be released via npm? I see that this issue is tagged as "needs tests" - I can try to take a crack at that if someone points me in the right direction. |
@mkopinsky did #171 work for you? If so, I can cut a release today. |
Yes. I am working through https://github.com/punkave/albedo, and a SQL query like |
Hey @knownasilya can you cut that release? Or, is there any other testing I can do that would help? |
v3.8.0 has been released |
Awesome, thanks!! |
Instead of a newline in a field, I just get the string \n .
When I manually create the CSV string myself, it works great.
The text was updated successfully, but these errors were encountered: