Export Dashboards

In Dashboards, you can export the whole dashboard to PDF files, or individual visualizations as XLSX or CSV files.

Export Whole Dashboard

You can export the whole dashboard through the user interface in Dashboards or via API.

UI
Python
API (Bash)
  1. Open the dashboard that you want to export.
  2. Click the three dots icon in the top right corner.
  3. Click Export to PDF.
  4. Save the file. Dashboards save the file to your hard drive.
Export visualization

To export a dashboard using the GoodData Python SDK, check the following code:

from gooddata_sdk import GoodDataSdk, ExportRequest


# GoodData base URL, e.g. "https://www.example.com"
host = "https://www.example.com"
token = "<your_personal_access_token>"
sdk = GoodDataSdk.create(host, token)

# Export a dashboard in PDF format
sdk.export.export_pdf(
  workspace_id = "demo", 
  dashboard_id = "dashboard_overview", 
  file_name = "dashboard_overview_export.pdf"  
)

To export a dashboard, submit a POST request to /api/actions/workspaces/{workspace-id}/export/visual:

curl $HOST_URL/api/v1/actions/workspaces/$WORKSPACE_ID/export/visual \
  -H "Content-Type: application/vnd.gooddata.api+json" \
  -H "Accept: application/vnd.gooddata.api+json" \
  -H "Authorization: Bearer <API_TOKEN>" \
  -X POST \
  -d '{
      "fileName": "<export_filename>",
      "dashboardId": "<dashboard_id>"
  }' | jq .

The response body contains the export_id that you can use later to receive this export again.

To receive a previously generated export, submit a GET request to /api/actions/workspaces/{workspace-id}/export/visual/{export-id}:

curl $HOST_URL/api/v1/actions/workspaces/$WORKSPACE_ID/export/tabular/$EXPORT_ID \
  -H "Authorization: Bearer <API_TOKEN>" \
  -X GET \
  --output <export_filename>.pdf

For details about the exported file, see the File types section.

Export Individual Visualizations

  1. Open the dashboard from which you want to export visualizations.
  2. Hover your mouse over the visualization that you want to export.
  3. Click the three dots in the top right corner.
  4. Click Export to CSV.
  5. Save the file.

For details about the exported file, see the File types section.

Export visualization

If you drill down or drill to a visualization from a dashboard, you can also export this visualization to XLSX or CSV.

Export drilled visualization

File Types

PDF

Export dashboards to PDF files if you do not need to process the data further and you want to show all visualizations and KPIs in a single file.

The PDF file includes the dashboard name, date of the export, and page numbers.

XLSX

Export your data to an XLSX file if you want to analyze the formatted data in a spreadsheet.

XLSX with Unmerged Cells

By default, visualizations that are grouped by attributes contain merged cells in the exported XLSX file.

To export without merging, unselect Keep attribute cells merged in the Export to XLSX dialog.

Export merged cells

The following image shows the difference between exported data with merged and unmerged cells in the Date (Date) column.

Export merged cells

Custom Number Format

By default, when you export visualizations to XLSX, the number formats applied to the cells containing metrics are propagated to the result XLSX file exactly as defined in the visualization.

For example, if some metrics in an visualization have a number format that displays negative numbers in red and positive numbers in green, this format will be applied to the cells with these metrics in the XLSX file.

CSV

If you want to process report data in more detail in another application, and do not need formatting, export the report as a CSV file.

Schedule Export

If you want to schedule your exports (for example, every morning at 8:00), you can use a schedule library and GoodData Python SDK:

from gooddata_sdk import GoodDataSdk, ExportRequest
import schedule


# GoodData base URL, e.g. "https://www.example.com"
host = "https://www.example.com"
token = "<your_personal_access_token>"
sdk = GoodDataSdk.create(host, token)


def export_pdf():    
    # Export a dashboard in PDF format
    sdk.export.export_pdf(
      workspace_id = "demo", 
      dashboard_id = "dashboard_overview", 
      file_name  = "dashboard_overview_export.pdf"
    )


# Schedule call to export dashboard in PDF every morning at 8:00.
schedule.every().day.at("8:00").do(export_pdf)

Sending Export via E-mail

You can send exported data to email by utilizing smtplib, email, and GoodData Python SDK libraries:

from gooddata_sdk import GoodDataSdk
import schedule
import smtplib
from os.path import basename
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.utils import COMMASPACE, formatdate


# GoodData base URL, e.g. "https://www.example.com"
host = "https://www.example.com"
token = "<your_personal_access_token>"
sdk = GoodDataSdk.create(host, token)


def send_mail(send_from, send_to, subject, text, files, server):
   msg = MIMEMultipart()
   msg["From"] = send_from
   msg["To"] = send_to
   msg["Date"] = formatdate(localtime=True)
   msg["Subject"] = subject

   msg.attach(MIMEText(text))

   # Open PDF file(s) and add it to email attachment
   for f in files or []:
       with open(f, "rb") as fil:
           part = MIMEApplication(
               fil.read(),
               Name=basename(f)
           )
       part["Content-Disposition"] = "attachment; filename=\"%s\"" % basename(f)
       msg.attach(part)

   smtp = smtplib.SMTP(server)
   smtp.sendmail(send_from, send_to, msg.as_string())
   smtp.close()


def export_pdf():    
    # Export a dashboard in PDF format
    sdk.export.export_pdf(
      workspace_id = "demo", 
      dashboard_id = "dashboard_overview", 
      file_name  = "dashboard_overview_export.pdf"
    )

    send_mail(
        send_from = "your@email.com",
        send_to = "to@email.com",
        subject = "Scheduled export",
        text = "Scheduled export of dashboard 'dashboard_overview'",
        # Name of exported file from the method call 'export_pdf'
        files = "dashboard_overview_export.pdf",
        server = "<your_smtp_server>"
    )


# Schedule call to export dashboard in PDF and sends via e-email every morning at 8:00.
schedule.every().day.at("8:00").do(export_pdf)