Skip to content

Download data in Viewer

Download data displayed in a widget

In the configuration of a widget, in the Export section, you can enable download in CSV or XLS file of the widget data. This will only download the content of the chart or the table where it is activated.

For a table (or any other chart), there is a maximum of 20.000 rows displayed and available for download.

Download all the rows from a datasource

If you're an admin, the best option is to open the datasource configuration and to click on the button "Download data as CVS File". But a dashboard viewer does not have access to this part of the software. Still, there is an option to add a button in a dashboard that will allow him to download the full data of a datasource.

As a first step, you need to enable the option 'Allow full download in Viewer' on the datasource. This is a security constraint. By default, exporting the full data from a datasource by a Viewer is disabled.

Once this option is activated, you can use the Javascript function named srnDownloadSourceData in a dashboard. The easiest way to do that is to create a KPI widget, select the source you want to download in its data configuration and the $$count$$ measure (this is only required to have a valid configuration for the widget). Then, in the rendering section of the widget, choose the template Custom HTML and trigger the function srnDownloadSourceData by a onclick set on one element. Here is a simple example:

<!-- use flex to center the content-->
<div style="display:flex;

<!-- button with the onclick triggering the CSV download-->
<div style="font-size: 1.5vw;
            padding: 10px;
            margin: 10px;
            border: 1px solid #0099cc;
            color: #0099cc;
            border-radius: 4px;
            width: 80%;
            text-align: center"
    <span class="fa fa-download"></span>
    Download mydata