superset icon indicating copy to clipboard operation
superset copied to clipboard

feat: Add excel export

Open igorsinc opened this issue 2 years ago • 1 comments

SUMMARY

Add options to export in xls/xlsx formats.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

https://user-images.githubusercontent.com/102555782/199495077-56577feb-4ef7-4da7-a500-53c453377a1c.mov

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • [ ] Has associated issue:
  • [ ] Required feature flags:
  • [x] 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
  • [x] Introduces new feature or API
  • [ ] Removes existing feature or API

igorsinc avatar Nov 02 '22 12:11 igorsinc

Codecov Report

Merging #22006 (1e794cb) into master (8226110) will decrease coverage by 11.25%. The diff coverage is 77.77%.

:exclamation: Current head 1e794cb differs from pull request most recent head 4c98433. Consider uploading reports for the commit 4c98433 to get more accurate results

@@             Coverage Diff             @@
##           master   #22006       +/-   ##
===========================================
- Coverage   67.19%   55.95%   -11.25%     
===========================================
  Files        1870     1871        +1     
  Lines       71746    71774       +28     
  Branches     7869     7869               
===========================================
- Hits        48209    40159     -8050     
- Misses      21519    29597     +8078     
  Partials     2018     2018               
Flag Coverage Δ
hive 52.58% <100.00%> (+0.03%) :arrow_up:
mysql ?
postgres ?
presto 52.47% <100.00%> (+0.03%) :arrow_up:
python 58.31% <100.00%> (-23.50%) :arrow_down:
sqlite ?
unit 51.53% <40.00%> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...mponents/useExploreAdditionalActionsMenu/index.jsx 63.85% <0.00%> (ø)
superset/charts/data/api.py 88.82% <100.00%> (+0.47%) :arrow_up:
superset/common/chart_data.py 100.00% <100.00%> (ø)
superset/common/query_context_processor.py 62.80% <100.00%> (-25.85%) :arrow_down:
superset/config.py 91.17% <100.00%> (-0.57%) :arrow_down:
superset/utils/excel.py 100.00% <100.00%> (ø)
superset/views/base.py 62.71% <100.00%> (-14.35%) :arrow_down:
superset/utils/dashboard_import_export.py 0.00% <0.00%> (-100.00%) :arrow_down:
superset/tags/core.py 4.54% <0.00%> (-95.46%) :arrow_down:
superset/key_value/commands/update.py 0.00% <0.00%> (-90.91%) :arrow_down:
... and 297 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Nov 12 '22 12:11 codecov[bot]

/testenv up

villebro avatar Jan 27 '23 11:01 villebro

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

github-actions[bot] avatar Jan 27 '23 11:01 github-actions[bot]

@dpgaspar @villebro Can you review and merge the PR?

EugeneTorap avatar Jan 27 '23 12:01 EugeneTorap

Ephemeral environment shutdown and build artifacts deleted.

github-actions[bot] avatar Jan 27 '23 18:01 github-actions[bot]

Hi @EugeneTorap this is a nice feature, as mentioned here : https://github.com/apache/superset/issues/14415, is it planned to bring excel export to the dashboard?

mathieudruart avatar Feb 27 '23 20:02 mathieudruart

Hi @mathieudruart! Thanks! Feel free to open a PR for it.

EugeneTorap avatar Feb 27 '23 21:02 EugeneTorap

Hi, discovered htat on 2.1.0-rc2 it's great. I would have a question though : how would it be possible to choose a locale to export xls to ? Meaning decimal separator mainly.

Maybe it's something feasible globally in superset, I didn't find.

squalou avatar Mar 14 '23 17:03 squalou

may I suggest this

https://github.com/apache/superset/issues/23375

squalou avatar Mar 15 '23 10:03 squalou

Hello, is it possible to incorporate Excel functionality into SQLab as well? #25863

Habeeb556 avatar Feb 22 '24 06:02 Habeeb556

A PR for that would be awesome/welcomed!

rusackas avatar Feb 22 '24 20:02 rusackas

@igorsinc I got the row limit set for the chart was reached. #29409

Habeeb556 avatar Jul 07 '24 16:07 Habeeb556