Tabcmd is a powerful tool, allowing a Tableau Server or Tableau user to do many things, such as create sites and users via a command line interface (CLI).
tabcmd export, users can export views, workbooks, and data to PDF, CSV or PNG.
Downloading and Installing tabcmd
tabcmd is installed by default on Tableau Server, but you can install tabcmd on any host. In this blog we will exclusively be on using tabcmd on Ubuntu 18.04.
You can download any version of tabcmd directly from Tableau's releases page for Tableau Server. In the example below, we use
wget to download the tabcmd debian package.
cd /tmp wget https://downloads.tableau.com/esdalt/2018.3.3/tableau-tabcmd-2018-3-3_all.deb
Change the version above to the version of your Tableau Server/Online.
Next we install tabcmd using
dpkg and delete the debian package.
sudo dpkg -i /tmp/tableau-tabcmd-2018-3-3_all.deb rm /tmp/tableau-tabcmd-2018-3-3_all.deb
You will have to exit and reconnect to your host after installation to get
tabcmd in your
$PATH. Ensure it's there with
which tabcmd. Once installed accept the EULA with:
tabcmd version --accepteula
For the export to work you will also need the java runtime installed:
sudo apt-get install openjdk-8.jre-headless
Using Tabcmd to Export a Tableau Dashboard as a PDF
To see a help page for
tabcmd export with command and global flags use:
tabcmd help export.
On our Tableau sever we have an example workbook:
In this example we have the view IncomeStatement in the IncomeStatement workbook. It has a URL similar to this:
The part of the URL we need is "
NOTE: Even if you're exporting every view in the workbook (using
--fullpdf) you will need to include a view in the Tabcmd command. More on that below.
Example Export Tabcmd Command
tabcmd export 'IncomeStatement/IncomeStatement' --fullpdf --pagelayout landscape --pagesize letter -f '/home/ubuntu/year_to_date_full.pdf' -s 'https://<server_name>' -t <site_name> -u '<username>' -p '<password>'
This will create a PDF document with the view in landscape, on a standard letter page size. It will output to a file named:
As our workbook only has one view,
--fullpdf will output a one page pdf of our view. We could have also used
--fullpdf would have multiple pages, with a different view on each page. Alternatively, You can also output as CSV, and PNG respectively with
If you are not using a site you can omit
If you're running the export command from your Tableau server you will not need to include server (
-s), username (
-u), and password (
Visit here for a complete list of commands you can use with the tabcmd command line tool.
Make administering Tableau a breeze with the following resources from Zuar:
> With Zuar's Portals, you can provide branded Tableau dashboards to monetize your data, or provide secure access outside of corporate firewalls.
> With the Mitto ELT solution, you can get data flowing from hundreds of potential sources into a single destination, fully prepared for Tableau.
> Zuar's Tableau-certified consultants can take care of all the heavy lifting.
> Check out our tips & tricks for Tableau, including: