by Jennifer Hunter, Analytics Manager
No matter how beautiful and informative and actionable your Tableau visualizations may be, there will always be a person or use case for exporting data to a tabular format usually via excel.
Though this is still surprisingly more difficult than it should be, there are some ‘non-coding’ options to help satisfy this requirement.
Let’s go through the “easy” options for allowing others to get the data behind your visualizations and what to expect from the output.
First, the easiest and really ONLY way to export everything on a dashboard at once to a single excel workbook is to use the ‘Export All Extension’ developed by the Information Lab explained here (for Tableau version 2018.2 or later). This extension allows you to create a nice export button on a dashboard which will prompt you to select which sheets and columns you want to export. Note, if using this for business dashboards with sensitive data, be aware of the security issues around its use. The remaining options for retrieving data require exporting a single sheet at a time.
From Tableau Desktop there are several built-in options explained in Tableau’s help documentation here. You can export your entire data source or a subset from the data source page or from the data pane within a view.
The export options are to a .csv file or as an extract (.hyper) file or as a tableau data source (.tds) file. Any of these can then be used to connect directly to Tableau or share the data for others to use. If you only want the data used to create a single view or sheet, the options are to either export/copy to .csv or to a crosstab in excel.
The main difference between these two options is the control over the output.
The .csv does not preserve formatting so the fields used the create the view will appear in alphabetical order whereas the crosstab will preserve formatting (unless you turn this off) which will give a “prettier” appearance to your end-user. If you have larger data, the performance of the crosstab could be impacted or error out in my experience. To exercise a bit more control you can use aliasing to force column order when using the .csv option or you can also simply create the exact view your users want to export depending on the needs of your use case.
In most cases, your users will want an easy way to export data from Tableau Server where they typically access the content you create. If preservation of formatting is preferable, then simply selecting the viz/sheet you want to export on your dashboard and then clicking the download icon at the top right of the window and selecting ‘Crosstab’ is the best option. This method does require brief end-user education, but the output is “pretty”, will account for any filtering done before exporting, and can handle a large data set.
You can also select the ‘Data’ option from the Download menu if formatting is not necessary, but the same rules will apply to this output as it does from Tableau Desktop. If you do not want to have to educate your end-users and desire an “Easy button” then follow the directions from Andy Kriebel here in which he shows you how to easily append .csv to the end of your dashboard URL and embed that within an image icon on your dashboard. Note, this method will behave like the other .csv exports described above. You can also pass parameter/filter values to the URL described here.
Jennifer Hunter is a Manager of Analytics Consulting at Data Ideology with more than 7 years of experience encompassing many areas of reporting, analytics, and mathematics.