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

[DataGrid] Fix line break characters breaking CSV rows #3590

Merged
merged 2 commits into from Jan 13, 2022

Conversation

cherniavskii
Copy link
Member

Fixes #2860

When cell value contains line break character, CSV export results in broken CSV since part of the value goes to the next line.
Wrapping value into quotes in this case fixes the issue.

When cell value contains line break character, CSV export results in broken CSV since part of the value goes to the next line.
Wrapping value into quotes in this case fixes the issue.
@cherniavskii cherniavskii added the component: data grid This is the name of the generic UI component, not the React module! label Jan 11, 2022
@m4theushw m4theushw self-requested a review January 12, 2022 02:58
Copy link
Member

@m4theushw m4theushw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. It opened correctly in Excel on Windows.

image

@cherniavskii cherniavskii merged commit f343bc3 into mui:master Jan 13, 2022
@cherniavskii cherniavskii deleted the csv-newlines branch January 13, 2022 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DataGrid] Export CSV line break special character
2 participants