material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

DataGrid with checkbox selection column widths break after exporting to Excel

Open lwestenberg opened this issue 9 months ago • 0 comments

Steps to reproduce

Link to live example: https://mui.com/x/react-data-grid/export/#using-a-web-worker

Steps:

  1. Select a row with the checkbox
  2. Click Export -> Export to Excel

The (generated) row column widths are now completely gone: mui-datagrid-export-broken

Current behavior

The (generated) row column widths are removed, the complete table row alignment becomes different

Expected behavior

The (generated) row column widths should stay the same, the alignments should stay the same

Context

not applicable

Your environment

npx @mui/envinfo
System:
    OS: macOS 14.2.1
  Binaries:
    Node: 21.7.2 - /opt/homebrew/bin/node
    npm: 10.5.0 - /opt/homebrew/bin/npm
    pnpm: 7.13.5 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 124.0.6367.208
    Edge: Not Found
    Safari: 17.2.1

I used Chrome and Safari to check for the issue

Search keywords: export, row selection, width, excel

lwestenberg avatar May 16 '24 11:05 lwestenberg