-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
All values in exported CSV are enclosed within double quotes #2631
Comments
could someone please reply? this seems to be a bug rather than a query as I just tried to write my custom exportCsv() using the csvBuilder and the exported file doesn't contain values within double quotes. If there is a hack i.e. undocumented feature in MUI Table export functionality such as setting some other flags for export of the data value definition, please advise. Really don't want to end up writing a custom function just to remove double quoted values in the exported CSV. I also noticed that numeric values which are defined as numeric ({ title: 'Birth Year', field: 'birthYear', type: 'numeric' },) type in the column definition gets exported without quotes... |
I see that you posted a similar issue on mbrn/filefy#22 I think that's where the issue actually belongs, so perhaps this issue should be closed? In the I believe that this is by design. Any field in a CSV file could itself contain a |
I originally posted here as I wasn't using filefy. Used filefy as I couldn't get any feedback here. Thanks for the explanation though why it doesn't enclose values in quotes when you export the EXPORTED csv file from Excel as a TAB delimited ? This just adds extra step for the end user to use Excel when it shouldn't be needed. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required. |
Guidelines
Please include a demo of the issue/behavior/question you have
When I use builtin export feature to export data as a TAB or COMMA delimited file, all values including headers in the resultant file are enclosed within double quotes. I've gone through the documentation on material-table.com but there isn't seem to be any explanation on how to prevent this. see below export
<MaterialTable
title="Validation Results"
icons={tableIcons}
columns={exceptionReportColumns}
data={applicationList}
options={{
exportButton: true,
exportAllData: true,
showTitle: false,
isLoading: true,
headerStyle: {
backgroundColor: "#01579b",
color: "#FFF",
},
rowStyle: (rowData) => ({
color: rowData.errors !== "" ? "red" : "",
}),
}}
editable={{
onRowUpdate: (newData, oldData) =>
new Promise((resolve, reject) => {
setTimeout(() => {
const dataUpdate = [...applicationList];
const index = oldData.tableData.id;
dataUpdate[index] = newData;
setApplicationList([...dataUpdate]);
The text was updated successfully, but these errors were encountered: