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

[data grid] Grouped column with empty Header exports to Excel with __row_group_by_columns_group__ name #7008

Closed
2 tasks done
rettoua opened this issue Nov 26, 2022 · 3 comments · Fixed by #7029
Closed
2 tasks done
Assignees
Labels
component: data grid This is the name of the generic UI component, not the React module! plan: Pro Impact at least one Pro user

Comments

@rettoua
Copy link
Contributor

rettoua commented Nov 26, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

Link to live example:
https://codesandbox.io/s/immutable-cherry-51xoxo?file=/demo.tsx

Steps:

  1. Open the example and click on the Export button.
  2. Open exported Excel file

Current behavior 😯

there is __row_group_by_columns_group__ header for grouped column

Expected behavior 🤔

Grouped column header must be the same as set in the groupingColDef options

Context 🔦

No response

Your environment 🌎

npx @mui/envinfo
   System:
    OS: macOS 13.0
  Binaries:
    Node: 16.13.2 - /usr/local/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.1.2 - /usr/local/bin/npm
  Browsers:
    Chrome: 107.0.5304.121
  npmPackages:
    @emotion/react: ~11.10.0 => 11.10.4 
    @emotion/styled: ~11.10.0 => 11.10.4 
    @mui/base:  5.0.0-alpha.79 
    @mui/icons-material: ~5.8.4 => 5.8.4 
    @mui/lab: 5.0.0-alpha.80 => 5.0.0-alpha.80 
    @mui/material: ~5.6.4 => 5.6.4 
    @mui/private-theming:  5.10.6 
    @mui/styled-engine:  5.10.7 
    @mui/styles: ~5.6.2 => 5.6.2 
    @mui/system:  5.10.7 
    @mui/types:  7.2.0 
    @mui/utils:  5.10.6 
    @mui/x-data-grid: ~5.17.12 => 5.17.12 
    @mui/x-data-grid-premium: ~5.17.12 => 5.17.12 
    @mui/x-data-grid-pro: ~5.17.12 => 5.17.12 
    @mui/x-date-pickers: ~5.0.0-beta.4 => 5.0.3 
    @mui/x-license-pro:  5.17.12 
    @types/react: ~18.0.21 => 18.0.21 
    react: ~17.0.2 => 17.0.2 
    react-dom: ~17.0.2 => 17.0.2 
    typescript: ~4.6.4 => 4.6.4 

Order ID 💳 (optional)

54867

@rettoua rettoua added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 26, 2022
@yaredtsy
Copy link
Contributor

hey @rettoua
when you create columns if headerName is empty it uses the field as the headerName. __row_group_by_columns_group__ is the filed name of the column. if you want it to be empty you can use space

@rettoua
Copy link
Contributor Author

rettoua commented Nov 28, 2022

hi @yaredtsy the component needs to be consistent in its functionality, if empty headerName works in js it also must work while exporting. I spent quite some time figuring out what is wrong and came to the same conclusion that you've mentioned: use space, but it shouldn't be that way.

@zannager zannager added component: data grid This is the name of the generic UI component, not the React module! plan: Pro Impact at least one Pro user labels Nov 28, 2022
@m4theushw m4theushw removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 28, 2022
@alexfauquette
Copy link
Member

Effectively, it's a problem of using || instead of ?? in the excel export

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! plan: Pro Impact at least one Pro user
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants