Skip to content
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

excelStrings option works incorrectly with quoted values #511

Closed
mikhalev-im opened this issue Jan 27, 2021 · 2 comments · Fixed by #513
Closed

excelStrings option works incorrectly with quoted values #511

mikhalev-im opened this issue Jan 27, 2021 · 2 comments · Fixed by #513
Labels

Comments

@mikhalev-im
Copy link

Version of json2csv: 5.0.5
Node version: 12.19.1

Code:

const { Parser } = require('json2csv');

const parser = new Parser({
  header: false,
  delimiter: ';',
  excelStrings: true,
});

const data = {
  field1: 'string',
  field2: '"quoted"'
};

parser.parse(data);  // result: "=""string""";"=""""quote"""""

If you write the result to a file and open it in excel, there would be an error in a quoted value:

Снимок экрана от 2021-01-27 10-33-07

The tooltip is saying that the formula has an error.

@mikhalev-im
Copy link
Author

Guys, thank you for your work! Do you know when this fix will be released on npm?

@knownasilya
Copy link
Collaborator

Should be released as [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants