Export the current visualization. This sample show how you can export the visualization in different formats: as a PDF file, as an image file, as a CSV file, as an Excel file, or as a PowerPoint file. You can also open the Download dialog box to let the user choose.


<!DOCTYPE html>


    <script type="text/javascript"
    <script type="text/javascript">
        var viz;

        function initViz() {
            var containerDiv = document.getElementById("vizContainer"),
                url = "http://public.tableau.com/views/RegionalSampleWorkbook/Obesity",
                options = {
                    hideTabs: true

            viz = new tableau.Viz(containerDiv, url, options);
            // Create a viz object and embed it in the container div.

        // Opens the Download to PDF dialog box
        function exportToPDF() {

		// Opens the Download Crosstab dialog box
        function exportToCSV() {

		// Downloads the crosstab data in an Excel file
        function exportToExcel() {

		// Opens the Download Image dialog box
        function exportImage() {

		// Opens the Download PowerPoint dialog box
        function exportPowerPoint() {
 		// Opens the Download dialog box
        function showDownloadDialog() {


<body onload="initViz();">
    <div id="vizContainer"></div>
    <button onclick="exportToPDF();">Export to PDF</button>
    <button onclick="exportToCSV();">Export to CSV</button>
    <button onclick="exportToExcel();">Export to Excel</button>
    <button onclick="exportImage();">Export as Image</button>
    <button onclick="exportPowerPoint();">Export to PowerPoint</button>
    <button onclick="showDownloadDialog();">Show Download Dialog</button>


Thanks for your feedback!Your feedback has been successfully submitted. Thank you!