-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Escape formulas in CSV and Excel export #13115
Conversation
to make adding new options easier
Deploy preview: https://deploy-preview-13115--material-ui-x.netlify.app/ Updated pages: |
/** | ||
* If `true`, the formulas in the cells will be escaped. | ||
* It is recommended to set this to `true` for security reasons. | ||
* @default false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mui/xgrid What do you think about making it true
by default?
Technically, it's a breaking change, but it's also a security fix.
Any objections?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objection, we should change it.
* It is recommended to set this to `true` for security reasons. | ||
* @default false | ||
*/ | ||
escapeFormulae?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
escapeFormulas
? From what I can read online formulas seems to be the most popular plural for formula.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed the same naming that exceljs
used:
mui-x/packages/x-data-grid-premium/src/hooks/features/export/serializer/excelSerializer.ts
Line 123 in 760ea7e
formulae: [ |
But I actually prefer escapeFormulas
, I'll update 👍🏻
Closes #11702