Skip to main content
Version: Next

Exporting Dashboard Data to Excel

Superset can export every chart on a dashboard to a single Excel workbook, with each chart's underlying data rendered as its own worksheet. The export reflects the dashboard's currently applied filters.

How the finished workbook reaches you depends on whether the deployment has export storage configured:

  • With export storage, a background worker builds the workbook. The page polls for completion and downloads it automatically, and a logged-in user with an email address also receives a time-limited download link by email. Sessions with no email on file (embedded guest-token sessions and anonymous Public-role users) rely on the polling download alone.
  • Without export storage, Superset builds the workbook during the request and returns it to the browser. This path only supports data exports within EXCEL_EXPORT_SYNC_MAX_ROWS (see Prerequisites).

Using the export​

From a dashboard, open the ... (actions) → Download submenu and choose Export Data to Excel. The action appears for users who have the dashboard can_export permission. Where the export is queued you'll see a confirmation that it is being prepared; either way, the workbook downloads automatically when ready.

A second option, Export Images to Excel, embeds each non-table chart as a rendered image (tables stay tabular) instead of exporting raw data. Because it renders charts through the headless webdriver, this option only appears when the webdriver screenshot feature flags are enabled (see the prerequisites below); which viz types stay tabular is controlled by EXCEL_EXPORT_TABLE_VIZ_TYPES. Image exports always run in the background and require export storage.

Notes on the generated workbook:

  • One worksheet per chart, named {chart_id} - {chart title} (truncated to Excel's 31-character limit; the chart id keeps names unique).
  • Charts nested in tabs are included.
  • Data reflects the dashboard's active filter state at the time of export.
  • A chart with no saved query context (charts only store one once they've been re-saved in Explore) still exports when it is a table, big_number, big_number_total or pie, by rebuilding the query from the chart's saved form data. Charts of other types, and charts relying on post-processing the rebuild can't reproduce, are skipped and listed in an Export Summary worksheet added to the workbook (and in the email, when one is sent); open the chart in Explore and re-save it to include it next time, or configure EXCEL_EXPORT_QUERY_CONTEXT_BUILDER.
  • Rebuilt server-paginated tables use the configured full row limit rather than the interactive page size, and do not add a row-count worksheet.
  • Row counts per sheet are capped the same way as the chart-level CSV/Excel export (ROW_LIMIT, bounded by SQL_MAX_ROW), and never exceed Excel's per-sheet maximum.

Prerequisites​

Dashboard data exports need no configuration. By default, Superset builds the workbook during the request and returns it to the browser. The combined row_limit of its queries must not exceed EXCEL_EXPORT_SYNC_MAX_ROWS (100,000 by default). A query counts as one row when it groups nothing and every metric it selects is a known aggregate; a Custom SQL metric that cannot be shown to aggregate counts for its full row_limit. Queries without a row_limit use ROW_LIMIT. Keep this setting within your web server's request timeout.

A chart whose size can't be known before it runs is left out of a direct download and listed on the Export Summary sheet; the rest of the dashboard still downloads. That covers queries that use grouping sets (pivot tables with a metric other than a simple SUM, COUNT, MIN or MAX, such as AVG, COUNT DISTINCT, a saved metric or Custom SQL) and post-processing that can add rows (such as the Resample and Forecast options, or a custom EXTRA_PANDAS_POSTPROCESSING_OPS operation). The background path exports those charts too. If leaving them out means no chart is left to run, the direct download is refused with a message asking the user to contact an administrator, rather than returning a workbook that holds only the summary sheet.

For larger data exports and all image exports, configure the background path:

  1. A storage bucket and backend. Configure EXPORT_STORAGE with both a bucket and a backend matching the bucket's provider. There is no implicit default:

    from superset.utils.s3 import S3ExportStorage # AWS S3
    # from superset.utils.gcs import GCSExportStorage # Google Cloud Storage

    EXPORT_STORAGE = {
    "bucket": "my-export-bucket",
    "backend": S3ExportStorage(),
    }

    Until both are set, exports use the direct-download path described above.

    Upgrading from EXCEL_EXPORT_S3_*

    EXCEL_EXPORT_S3_BUCKET, EXCEL_EXPORT_S3_KEY_PREFIX and EXCEL_EXPORT_S3_CLIENT_KWARGS were replaced by EXPORT_STORAGE and are no longer read. Move the bucket and prefix across, pass the client kwargs to S3ExportStorage(client_kwargs=...), and set backend explicitly: it has no default, so exports fall back to direct downloads until it is set.

  2. The backend's SDK dependency, on both the web and worker tiers (the worker uploads, the web server streams downloads). Not installed by default; install pip install apache-superset[excel-export] (boto3) for S3ExportStorage, or pip install apache-superset[excel-export-gcs] (google-cloud-storage) for GCSExportStorage. Without it, exports fail.

  3. A running Celery worker. The background export runs as a Celery task. With CELERY_CONFIG = None, exports download directly as if no storage were configured, and a warning is logged. Superset does not check that a worker is alive: if none is running, the request is accepted, nothing is produced, and the browser reports that the export is taking longer than expected.

  4. A configured SMTP transport, for email delivery only. When set (same settings as alerts & reports: SMTP_*, EMAIL_REPORTS_SUBJECT_PREFIX), logged-in users with an email address also receive the download link by email. The polling auto-download works without it. The emailed link is absolute and built from WEBDRIVER_BASEURL_USER_FRIENDLY (default http://0.0.0.0:8080/), so set it to your public Superset origin (e.g. WEBDRIVER_BASEURL_USER_FRIENDLY = "https://superset.example.com/") or remote recipients get an unreachable link.

Export Images to Excel also requires the headless webdriver used by scheduled reports and thumbnails (WEBDRIVER_*, plus the ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS and ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT feature flags). The menu option is hidden without export storage or when those flags are off. If the webdriver is unreachable, image charts come back empty even though the data export path still works.

Deployments that override CELERY_CONFIG must add "superset.tasks.export_dashboard_excel" to the imports tuple, or the task will not register.

Configuration keys​

KeyDefaultDescription
EXPORT_STORAGE["bucket"]unsetDestination bucket. Without it, eligible data exports download directly.
EXPORT_STORAGE["backend"]unsetStorage backend instance: S3ExportStorage() (superset.utils.s3), GCSExportStorage() (superset.utils.gcs), or a custom superset.utils.export_storage.ExportStorage implementation. Without it, eligible data exports download directly.
EXPORT_STORAGE["key_prefix"]"dashboard-exports/"Object key/blob prefix: {prefix}{dashboard_id}/{job_id}.xlsx. A callable (() -> str) is invoked per export inside the Celery worker (app context only, no request context; reading flask.request fails every export), so derive per-tenant prefixes from worker-ambient app config.
EXCEL_EXPORT_SYNC_MAX_ROWS100000Maximum combined query row_limit for a direct download. Ignored when export storage is configured.
EXCEL_EXPORT_LINK_TTL_SECONDS86400Lifetime of the Superset download link (24h) shared in the email and polling response. Each click streams the file from storage through Superset. Guest-token exports cap the link at one hour regardless of this value, since a guest retrieves the file within the polling window and has no email link to revisit later.
EXCEL_EXPORT_TABLE_VIZ_TYPESNoneViz types kept tabular in Export Images to Excel mode; every other type is embedded as an image. None uses the built-in default (table, pivot_table, pivot_table_v2).
EXCEL_EXPORT_QUERY_CONTEXT_BUILDERNoneOptional Callable[[form_data_dict], dict | None] to build a query context for a chart missing a saved one, tried before the built-in form-data rebuild. Point it at a service that runs the chart's real frontend buildQuery to faithfully export viz types the built-in rebuild can't handle. Must return None when it can't build faithfully, so the export falls back.

Credentials resolve through each SDK's standard chain — for S3, environment variables, shared config, or an instance role, with overrides available via S3ExportStorage(client_kwargs={...}) (e.g. region_name, or endpoint_url for MinIO/LocalStack); for GCS, Application Default Credentials. Two tiers need bucket access, which matters when they run under separate identities: the Celery worker uploads the file (write, e.g. s3:PutObject), while the web server streams it back at download time (read, e.g. s3:GetObject; on S3 also grant s3:ListBucket, or a lifecycle-expired object surfaces as AccessDenied instead of a clean "link expired"). No signing permissions are needed on either tier: downloads stream through Superset rather than redirecting to a signed storage URL.

Security considerations​

  • The download link is an unguessable Superset URL: anyone who holds it can download the workbook until the link expires, and every download streams through Superset (never a transferable signed storage URL). Keep the bucket private, enable encryption, and consider a lifecycle rule to delete objects after a few days. Lower EXCEL_EXPORT_LINK_TTL_SECONDS if 24 hours is too long for your data. Direct downloads are not stored or linked.
  • The export runs with the requesting user's permissions; each chart's query is access-checked, so users only ever receive data they are entitled to.

Limitations​

  • Embedded guest-token sessions have no email fallback. The export runs under the guest token's RLS rules and resource claims. With export storage, the page polls for completion and downloads automatically, so the browser tab must stay open until the export finishes; without it, the workbook is the response to the request. Export Images to Excel is not available to guest or anonymous (Public-role) sessions: the webdriver cannot render without a real user identity, so the menu hides it and the API rejects it for any session without a user id.
  • The default Export Data to Excel mode exports data only (no visual styling). Use Export Images to Excel to embed rendered chart images, which requires export storage and the webdriver setup described above.
  • Scheduled/automated exports are not part of this feature.