Bug description

"Export to Excel" function does not create xlsx file, instead JSON data are shown in browser. Tested in version 4.0.0 (docker image).

(however, it works for CSV export)

How to reproduce the bug

  1. Go to example dashboard with legacy chart,
  2. Select Export to Excel on one of legacy charts,
  3. Chart data should be exported to xlsx file.

Screenshots/recordings

Screencast 2024-03-15 18:03:46.webm

Superset version

4.0.0

Python version

3.9

Node version

16

Browser

Firefox

Additional context

No response

Checklist

  • [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: jpmonette

Same thing, I do get the JSON object, but not on all charts.

I do get it on the bar and line chart for example, but not on pie charts or KPIs.

Apache Superset Export to Excel is not working for legacy charts

Comment From: rusackas

Hmmm... that's the old explore_json endpoint, used by legacy charts, as opposed to the v1/chart/data endpoint, which is newer. I wonder the Excel export is broken for all the legacy charts, then.

Comment From: dkrat7

I tested the excel export function with other legacy charts and it is not working. I updated this issue from deck.gl to all legacy charts.

Comment From: progressive-scaler

Any updates on this?

I mean, is there any possibility to have the excel export from legacy charts, or is not expected that this functionality will work on them?

I am currently creating new charts in the hope the new created (sunburst pie) charts would reference v1/chart/data endpoint, but unfortunately when i try to download the chart as an Excel file, it still goes to the explore_json endpoint.

I am using 3.1.0 version

Thanks in advance

Comment From: rusackas

We're open to PRs if anyone wants to look at this, but we're still hoping to remove/replace all legacy charts over time and remove that (currently deprecated) explore_json endpoint. We'd welcome the contribution, but otherwise aren't planning to work on this anytime soon.