You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "mdusmanalvi (via GitHub)" <gi...@apache.org> on 2025/05/23 04:40:44 UTC

[PR] feat(pivot-table-chart) -> download as pivoted excel [superset]

mdusmanalvi opened a new pull request, #33569:
URL: https://github.com/apache/superset/pull/33569

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### 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
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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
   


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart): Download as pivoted excel [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #33569:
URL: https://github.com/apache/superset/pull/33569#issuecomment-3084699957

   @msyavuz Processing your ephemeral environment request [here](https://github.com/apache/superset/actions/runs/16350708376). Action: **up**. More information on [how to use or configure ephemeral environments](https://superset.apache.org/docs/contributing/howtos/#github-ephemeral-environments)


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart) -> download as pivoted excel [superset]

Posted by "korbit-ai[bot] (via GitHub)" <gi...@apache.org>.
korbit-ai[bot] commented on code in PR #33569:
URL: https://github.com/apache/superset/pull/33569#discussion_r2103794172


##########
superset-frontend/src/dashboard/components/gridComponents/Chart.jsx:
##########
@@ -58,6 +58,8 @@ import {
 } from '../../util/activeDashboardFilters';
 import getFormDataWithExtraFilters from '../../util/charts/getFormDataWithExtraFilters';
 import { PLACEHOLDER_DATASOURCE } from '../../constants';
+import * as XLSX from 'xlsx';

Review Comment:
   ### Unused XLSX Import <sub>![category Readability](https://img.shields.io/badge/Readability-0284c7)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   The XLSX library is imported but never used in the code, while the component relies on the `exportPivotExcel` utility for Excel-related operations.
   
   
   ###### Why this matters
   Unused imports increase bundle size and can lead to confusion about which Excel-related functionality is actually being used in the component.
   
   ###### Suggested change ∙ *Feature Preview*
   Remove the unused import:
   ```jsx
   // Remove this line
   // import * as XLSX from 'xlsx';
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/70828018-1ece-405d-9e2b-f84390c938d7/upvote) [![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/70828018-1ece-405d-9e2b-f84390c938d7?what_not_true=true)  [![Not in Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/70828018-1ece-405d-9e2b-f84390c938d7?what_out_of_scope=true) [![Not in coding standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/70828018-1ece-405d-9e2b-f84390c938d7?what_not_in_standard=true) [![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/70828018-1ece-405d-9e2b-f84390c938d7)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:dd19d2ad-48f3-4a56-815f-70d151b13212 -->
   
   
   [](dd19d2ad-48f3-4a56-815f-70d151b13212)



-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart) -> download as pivoted excel [superset]

Posted by "msyavuz (via GitHub)" <gi...@apache.org>.
msyavuz commented on PR #33569:
URL: https://github.com/apache/superset/pull/33569#issuecomment-2976863839

   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.


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart): Download as pivoted excel [superset]

Posted by "andy1xx8 (via GitHub)" <gi...@apache.org>.
andy1xx8 commented on PR #33569:
URL: https://github.com/apache/superset/pull/33569#issuecomment-3092916509

   Wow, I love this feature so much :3 


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart): Download as pivoted excel [superset]

Posted by "msyavuz (via GitHub)" <gi...@apache.org>.
msyavuz commented on PR #33569:
URL: https://github.com/apache/superset/pull/33569#issuecomment-3200727700

   It's only on master currently, @rusackas might have a better idea on which release you can use this in


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart): Download as pivoted excel [superset]

Posted by "msyavuz (via GitHub)" <gi...@apache.org>.
msyavuz commented on PR #33569:
URL: https://github.com/apache/superset/pull/33569#issuecomment-3210540631

   @LouisP-SuperiorWellness I have created an issue for that and working on fixing it, thanks for catching and reporting it as well.
   https://github.com/apache/superset/issues/34792


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart): Download as pivoted excel [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #33569:
URL: https://github.com/apache/superset/pull/33569#issuecomment-3084725552

   @msyavuz Ephemeral environment spinning up at http://34.219.1.120:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup.


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart): Download as pivoted excel [superset]

Posted by "msyavuz (via GitHub)" <gi...@apache.org>.
msyavuz commented on PR #33569:
URL: https://github.com/apache/superset/pull/33569#issuecomment-3200496768

   @LouisP-SuperiorWellness 
   It should be available on table charts without a feature flag


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart) -> download as pivoted excel [superset]

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on PR #33569:
URL: https://github.com/apache/superset/pull/33569#issuecomment-2904841314

   This would close at least one issue, and 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.


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart): Download as pivoted excel [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #33569:
URL: https://github.com/apache/superset/pull/33569#issuecomment-3084891695

   @msyavuz Processing your ephemeral environment request [here](https://github.com/apache/superset/actions/runs/16351955961). Action: **up**. More information on [how to use or configure ephemeral environments](https://superset.apache.org/docs/contributing/howtos/#github-ephemeral-environments)


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart): Download as pivoted excel [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #33569:
URL: https://github.com/apache/superset/pull/33569#issuecomment-3084923620

   @msyavuz Ephemeral environment spinning up at http://35.93.196.215:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup.


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart): Download as pivoted excel [superset]

Posted by "LouisP-SuperiorWellness (via GitHub)" <gi...@apache.org>.
LouisP-SuperiorWellness commented on PR #33569:
URL: https://github.com/apache/superset/pull/33569#issuecomment-3200597533

   @msyavuz Cheers for your response, i'm not seeing it on [superset-helm-chart-0.15.0] or [5.0.0], is it in the 6.0rc? Thanks again


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart): Download as pivoted excel [superset]

Posted by "LouisP-SuperiorWellness (via GitHub)" <gi...@apache.org>.
LouisP-SuperiorWellness commented on PR #33569:
URL: https://github.com/apache/superset/pull/33569#issuecomment-3210235831

   Cheers for your help guys, we rolled out the release candidate for the time being 👍 there is a slight quirk though, I've noticed if you have two pivot tables on the same dashboard, it seems to always export the data of the first one.
   Whether this issue is isolated to our superset instance or not i'm not sure, but either way we're working around it for now and it's working great.


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart): Download as pivoted excel [superset]

Posted by "LouisP-SuperiorWellness (via GitHub)" <gi...@apache.org>.
LouisP-SuperiorWellness commented on PR #33569:
URL: https://github.com/apache/superset/pull/33569#issuecomment-3200158894

   Hi all, just pulled down the latest branch of Superset, I can see the updated code in there, is this feature locked behind a feature flag or something? Can't seem to find it in my UI. Thanks


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart) -> download as pivoted excel [superset]

Posted by "msyavuz (via GitHub)" <gi...@apache.org>.
msyavuz commented on code in PR #33569:
URL: https://github.com/apache/superset/pull/33569#discussion_r2207378545


##########
superset-frontend/package.json:
##########
@@ -203,6 +203,7 @@
     "use-event-callback": "^0.1.0",
     "use-immer": "^0.9.0",
     "use-query-params": "^1.1.9",
+    "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",

Review Comment:
   Xlsx moved to their own hosting for the package but their license is still Apache 2.0
   https://git.sheetjs.com/sheetjs/sheetjs



-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart): Download as pivoted excel [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #33569:
URL: https://github.com/apache/superset/pull/33569#issuecomment-3208186394

   Yep, I believe this will be in 6.0, as we just cut the release branch. 


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(pivot-table-chart): Download as pivoted excel [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #33569:
URL: https://github.com/apache/superset/pull/33569


-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org