dosubot[bot] commented on issue #34731: URL: https://github.com/apache/superset/issues/34731#issuecomment-3195647688
<!-- Greeting --> Hi @LouisP-SuperiorWellness! I'm [Dosu](https://go.dosu.dev/dosubot) and Iām helping the superset team. <!-- Answer --> This is a known issue: when exporting a pivot table to CSV, multi-level columns (like Name, Colour, Location) are flattened into a single column in the output. The export logic for pivoted CSVs has moved to the frontend JavaScript code, specifically in components like `ExportToCSVDropdown` and the pivot table plugin files, which serialize the table for export by concatenating column names rather than preserving the hierarchy [[source](https://github.com/apache/superset/issues/32369)]. There isn't a straightforward fix or configuration to change this behavior in the current release. Maintainers have acknowledged the limitation and indicated that improvements are open for community contributions but not prioritized by core committers [[source](https://github.com/apache/superset/issues/32369)]. As a workaround, Superset recently added the ability to export pivot tables as pivoted Excel files, which preserves the multi-level column structure using the SheetJS library. You can use the "Export to Pivoted Excel" option from the chart or dashboard menu to get the correct structure in Excel format [[source](https://github.com/apache/superset/pull/33569)]. If you specifically need CSV, you might need to manually convert the Excel file to CSV after export. If you want to explore or contribute a fix, the relevant logic for CSV export is in the frontend files, especially around the pivot table plugin and export dropdown components. Any changes to how multi-level columns are handled would need to be made there. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/79d62d57-f327-4352-8ec7-3e886f5293a3?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/79d62d57-f327-4352-8ec7-3e886f5293a3?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/79d62d57-f327-4352-8ec7-3e886f5293a3?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/79d62d57-f327-4352-8ec7-3e886f5293a3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/79d62d57-f327-4352-8ec7-3e886f5293a3?feedback_type=hallucination) | [Report š](https://app.dosu.dev/response-feedback/79d62d57-f327-4352-8ec7-3e886f5293a3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/79d62d57-f327-4352-8ec7-3e886f5293a3?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/34731) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org