Monday, June 12, 2017

Java Scripting fun with Tableau


Here is one of the JavaScript I am listing below which will pop-up and will allow you to download the .CSV file of the dashboard you are viewing.
This feature doesn't exists till now in Tableau. However, the same functionality is existing in Qlikview and most of the time people will be looking for this feature.

End users get confused where to click to download the .CSV file of the view.
you can achieve this task by two ways

1. You can Add an image onto the dashboard, float it and add a URL to it that is the URL for the dashboard with .csv on the end.
 sample:  http://tableau.boa.com/views/Nammi_Workbook/Dashboard.csv

2. You can execute this javascript, which will allow end users to view the .CSV file of dashboard.
This actually pops-up and allows to downloads the worksheet.

function downloadToExcel() {
var popupWindow = window.open('http://tableau.boa.com/views/WorkbookNameOnServer/DashboardNammi.csv','','height=100, width = 425, location=no');
popupWindow.document.title = 'Once the Excel file has been downloaded, close this window.';
if (window.focus) {newwindow.focus()
return false;
}
}

On the HTML side, you can added a 'button' to a list that called the downloadToExcel() function.

Hope this helps.



1 comment:

  1. I feel since Tableau and its related aspects are always very useful it is amongst the best captivating tool for developers who need to produce error free database solutions.

    Tableau Soap Connection

    ReplyDelete

Java Scripting fun with Tableau

Here is one of the JavaScript I am listing below which will pop-up and will allow you to download the .CSV file of the dashboard you are v...