Skip to content

feat(pivot-table-chart) -> download as pivoted excel #33569

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mdusmanalvi
Copy link

@mdusmanalvi mdusmanalvi commented May 23, 2025

SUMMARY

Added the functionality of downloading charts as pivoted xlsx that is the the same structure will be seen in the downloaded file. This is implemented in two sections: while directly downloading charts and downloading charts from dashboards.
Library: https://www.npmjs.com/package/xlsx

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue: New Feature: Export Pivoted Table Structure from Dashboard #31828
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@dosubot dosubot bot added the viz:charts:pivot Related to the Pivot Table charts label May 23, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Readability Unused XLSX Import ▹ view 🧠 Not in scope
Files scanned
File Path Reviewed
superset-frontend/src/utils/downloadAsPivotExcel.ts
superset-frontend/src/dashboard/types.ts
superset-frontend/src/dashboard/components/SliceHeader/index.tsx
superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx
superset-frontend/src/dashboard/components/gridComponents/Chart.jsx
superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

@@ -58,6 +58,8 @@ import {
} from '../../util/activeDashboardFilters';
import getFormDataWithExtraFilters from '../../util/charts/getFormDataWithExtraFilters';
import { PLACEHOLDER_DATASOURCE } from '../../constants';
import * as XLSX from 'xlsx';

This comment was marked as resolved.

@sfirke
Copy link
Member

sfirke commented May 23, 2025

There are a handful of issues related to pivot table downloads: https://github.com/search?q=repo%3Aapache%2Fsuperset+pivot+download&type=issues FYI in case you want to see if this PR addresses any of them, or could.

@rusackas rusackas requested review from kgabryje, geido and justinpark May 27, 2025 17:21
@msyavuz msyavuz added the preset:committed Preset is actively following and committed to this pull request. label Jun 16, 2025
@msyavuz
Copy link
Member

msyavuz commented Jun 16, 2025

Hey, @mdusmanalvi do you intend to continue the work on this? The feature works great, I can help push this through the finish line as it just needs the cleanup and tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preset:committed Preset is actively following and committed to this pull request. size/M viz:charts:pivot Related to the Pivot Table charts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants