August 14, 2018
The Greatest Tableau Tip EVER: Exporting Made Simple!
UPDATE: 14 August 2018
Version 2018.2 of Tableau introduced Dashboard Extensions. To make exporting data from dashboards as easy as possible, The Information Lab CTO and Zen Master Hall of Famer Craig Bloodworth created the Export All extension. What does this do?
If you have at least version Tableau 2018.2, then I'd highly recommend the use of this extensions versus the technique outlined below.No matter how much you try to convince them, there will always be some users who want to reduce your beautiful Tableau charts to a table of numbers in Excel. So if they're going to do it anyway, you may as well give them a simple, controlled way, generating one Excel workbook and not a bunch of CSVs. With the Export All extension for Tableau Server you can place a simple button onto your dashboard, choose which sheets & columns are exported, and with one click your users can download a clean & tidy Excel workbook.
We’ve all heard this question before: How can I export a CSV in Tableau? To be honest, it’s quite the pain and way more difficult than it should be. There have always been a few options.
- Users can click on a specific sheet on a dashboard and then export that via the tiny button on the toolbar, but that has a few of its own problems: (1) You may not want to show the toolbar therefore making the export impossible, (2) People have to be trained to know exactly where to click to get it just right, and (3) You have no control over the output of the CSV.
- You can export a CSV using Tabcmd, but that’s not useful for the average dashboard consumer.
- You can add .csv to the end of the URL like http://[Tableau Server Location]/views/[Workbook Name]/[View Name].csv. But again, you never know what that output is going to look like.
Yesterday I learned an incredibly valuable trick that would make option 3 (adding .csv to the URL) export exactly the CSV you want. Let’s look at an example.
On this dashboard, notice how I added an Image object (I used an Excel icon) on the dashboard. I’ve floated it to the upper right and made it small. All the user has to do is click on that icon and they get a nice CSV. Go ahead, try it!
Did you try it? If you did, and you opened the CSV, you may have noticed this looks remarkably like the data that you would hope to get if you exported the data for the line chart. But I didn’t export the line chart at all. Here’s the trick.
- Add the image icon on the dashboard and place it wherever you like.
- Add a URL link to the image. In the dashboard above, the URL is http://public.tableausoftware.com/views/ExporttoCSV/Dashboard.csv?:showVizHome=no.
This is where the magic sauce happens. When you add .csv to the end of a Tableau URL, Tableau will export the first sheet on the dashboard alphabetically. Yes, it’s that simple! And it’s totally undocumented. Special thanks to the one and only Tableau Jedi Mark Rueter for this tip! But note that Tableau orders upper case before lower case. - What I did was float a sheet named AExport onto the dashboard. I changed the height to 1 and made everything white and transparent and chose Fit Entire View so that it would be inconspicuous. I had to name it with a capital A so that it would be the first sheet alphabetically on the dashboard.
The AExport worksheet started off like this:
Basically, you can put anything you want on this sheet. I then changed the transparency to 0% on the Color shelf, changed the default worksheet color to white, removed the row banding and removed the row and column dividers. The worksheet now looks like this:
- Create a worksheet that you want to export.
- Remove all of the formatting to make it look invisible.
- Be sure to give it a name that makes it first alphabetically on the dashboard.
- Place the worksheet on the dashboard, float it, make it fit the entire view, make it really small, move it somewhere inconspicuous.
- 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.
This is a game changer!! Download the sample workbook here.
Subscribe to:
Post Comments
(
Atom
)
Well that is rather neat isnt it
ReplyDeleteVery Clever Andy!!
ReplyDeleteThat is a game changer - fantastic! Thanks Andy.
ReplyDeleteAwesome find! Thanks for posting.
ReplyDeleteBeautifull solutions are always simpel! Thanks for posting
ReplyDeleteCan't wait to try this out.
ReplyDeleteI just tried it with javascript and it works well. In IE and Firefox, I was able to call upon the download window and in Chrome a popup window which downloads the worksheet. Here's the javascript I used:
Deletefunction downloadToExcel() {
var popupWindow = window.open('http://URLofTableauServer/views/WorkbookNameOnServer/DashboardName.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, I simply added a 'button' to a list that called the downloadToExcel() function.
Amazing Andy! Thanks for sharing!!
DeleteHey Andy! I tried this trick out, and it works on Chrome/Mozilla. Any way to get it and download on Safari?? Sorry, I am a Mac user.
DeleteWhere has this tip been all my life?
ReplyDeleteThanks!
@paulbanoub
Hi Andy! This is awesome - I've been looking for a way to make a "user friendly" export while still hiding the source view. One question though - it doesn't look like any filters the user applies are automatically passed. Do you know how I can set filters dynamically on an image url? Or am I better off using the URL action in the dashboard using a sheet that has the image? Thanks in advance!
ReplyDeleteSarah
Sarah, you can add filters to the URL. Here's how - http://vizwiz.blogspot.com/2012/11/tableau-tip-passing-filters-in-url-to.html
DeleteHi!
DeleteDid you find a way to pass user applied selections dynamically to the link? IE there was possible to filter on states, and the user selected Califorina, then the export should contain only information from California.
Sigmund
Sigmund, I have not looked into this case explicitly, but you should be able to add the filters to the URL.
DeleteHey Andy, similar to Sigmund, I wanted to add dynamic filtering to the export. In other words, I have multiple users accessing the dashboard, and some want to filter based on their respective location, group, etc... It wouldn't be efficent to imbed the filters into the url for several hundred people as they will have multiple possibilities. Is it possible to pass quick filter selections into the URL so that the export shows the fitered options?
DeleteThanks,
Rod
Rod,
DeleteI don't see any reason why this wouldn't work, but I haven't tested it either. Look at Tableau's documentation for how to pass options to the URL and see if it works.
Hey!
DeleteHas anyone tried to do this yet? I am looking to see how to export from the server the filtered information by the user!!
Thanks!
Emily
Hi, I actually tried doing that Nicholas suggested but I'm afraid it doesn't work for me. That additional sheet (like the AExport) is always showing the same set of data regardless of what filters I use on dashboard (I'm using dashboard actions for this). I'm still trying to play around with this and hopefully I can find a solution...
DeleteHey Andy, this is fantastic! Do you know, if you could adapt the URL exporting to excel? ".xlsx." didnt work for me...
ReplyDeleteExcel format is not supported, but that shouldn't be a hurdle. The cvs will open in Excel.
DeleteThis is great. However is the columns are not coming out in the order that I had hoped. Is there a way of enforcing the order that the columns are output?
ReplyDeleteI do not know what happens under the covers when you export. How are they coming out for you? Alphabetical?
ReplyDeleteOrder seems a little arbitrary.
ReplyDeleteHere are the first few columns:
Dept, 1st Opened, Item, Resolved,Queue,Region,....
I re-ordered the columns in the worksheet, but the columns come out in the same order :-(
Hi - I am having the same issue. Any advice?
DeleteHi,
DeleteJust ran into this yesterday. I could help myself by duplicating the specific fields and
rename those with the order number as prefix, e.g. 1_col, 2_col, etc. This would preserve the order. Of course it is not the best practice, but should solve the ordering problem. I hope Tableau comes with the solution of customizing the export feature.
Cheers
Great idea, but doesn't work for me due to URL hashtag numbering. (http://kb.tableausoftware.com/articles/issue/view-url-hash-fragment) Unfortunately, this forces the data export (via the Excel icon URL, ie, the "base" URL without the hashtag) to remain exactly as it was published. User changes are not applied to the base URL, but to the hashtag URL, if that makes sense. Any ideas how to work around this limitation? (Note: I am using Tableau server to render my workbooks.)
ReplyDeleteShawn,
DeleteDid you ever get a work around for this? I looked at Chris' post below but that didn't work. Dropping the hash tag did not enable the current view to be generated. Seems like only the original published view is generating.
Has anyone been able to export "filtered" CSV data by this method? (That is the CSV export dataset reflects changes the user has made to the hidden view via actions and quickfilters.) Try as I might, I cannot. I am using Tableau Server.
ReplyDeleteIf you pass the filters into the URL, then that would get you what you're looking for.
DeleteI need this. Quite badly. Jumping right into it I ran into the same problem as Shawn - the #n was interfering.
ReplyDeleteFortunately, this isn't really a problem - the #n was implemented in Tableau Server 8.1 as a session multi-view feature, and documented here: http://kb.tableausoftware.com/articles/issue/view-url-hash-fragment
and here: http://kb.tableausoftware.com/articles/issue/adding-parameters-to-url-ineffective-after-upgrade
Drop the #n from the UR, append ".csv" and everything's peachy.
Now if I can only figure out how to get the crosstab downloaded through a similar route - I'm running into numeric precision problems and would like to see if a sideways approach would work.
Thanks for the clarifications and feedback Chris!!
DeleteNot exactly this post's topic, but related: when copying or exporting a crosstab Tableau always honors the view-specific number formatting.
DeleteAccording to Tableau this is by design - and thanks to them for responding right away to my asking about this.
I understand the "by design" position, and in this case, like many others e.g. copying/pasting data from HTML tables, the only real response is: "well, the design is not good and a redesign is called for".
If nothing else copying and exporting data and crosstabs should be symmetrical in how the the data is rendered at the destination.
Chris, Perhaps I am missing something but dropping the hash tag no affect. Only the original published view is being generated.
DeleteMy URL looks like this: http://tableau.sbdmonline.com/views/Book2/DMZ.pdf
Do you guys know if there is a URL to get the Crosstab csv?
ReplyDeleteNot that I'm aware of. However, you could design the worksheet you want to export to look the way you want it to export and that should work I believe.
DeleteLove this, worked great!
ReplyDeleteGreat stuff! Are there any known ways to select which worksheet would be exported? Ie: for cases where each sheet on a dashboard has different data fields, this might not suffice for an end user.
ReplyDeleteThis technique only works for a single worksheet. If you want to export a specific worksheet on the dashboard, you need to first click on the sheet, then click on the export button on the Tableau toolbar. Here's a blog post with an example - http://vizwiz.blogspot.com/2012/09/tableau-tip-exporting-data-from.html
DeleteThis does not seem to export the results of applying quick filters. How do you add quick filters to URL dynamically?
ReplyDeleteRavindra you can add filters to the URL. Here's how - http://vizwiz.blogspot.com/2012/11/tableau-tip-passing-filters-in-url-to.html
DeleteHi Andy,
DeleteMy reports have a date filter on dashboard, so user can select a data range for the data. When i export the dashboard using .csv extension it does not reflect the date selection. How do i add this dynamic filter to the export url?
Ravindra, if you have a range date filter, you could create a calculated field that captures the min date and another that captures the max date, and then pass those fields in the URL.
DeleteHi Andy,
DeleteI am also facing the same issue, In my dashboard I have two date parameters like " From Date" and "To Date" and also few filters are there. How to pass these parameters and filters to that URL . Could please provide the Syntax for that .
Ahamad, the list of embed parameters can be found here: http://onlinehelp.tableau.com/current/server/en-us/help.htm#embed_list.htm
DeleteAnd here's a KB article about passing filters to the URL: http://kb.tableau.com/articles/knowledgebase/view-filters-url
Andy,
DeleteI have gone through that Knowledge base article, I have doubt in that in this URL "Market=west" is mentioned ,Instead of giving the direct value over there, can we pass the values dynamically. why because , in my requirement I have so many records is there, I can't pass the one by one manually right. If we choose the filter the data should change dynamically. please suggest this.
"http:///views/CoffeeSales/SalesPerformance?Market=West"
Ahamad, this post explain how to pass multiple items to a filter. http://vizwiz.blogspot.ie/2012/11/tableau-tip-passing-filters-in-url-to.html
DeleteAndy , I have checked that post . In that you have set that priority = critical , high
Deletehttp://public.tableausoftware.com/views/OneMinuteDashboard/OneMinuteDashboard.png?Region=Central&Order%20Priority=Critical,High
In Case if i need to set the 50 values over there how to do this dynamically, I Can't write the all values over there right., Please suggest this.
As far as I'm aware, you don't have any control over the order of the columns on export. But hey, at least you know how to export it now.
ReplyDeleteRoberto, the CSV can easily be imported into Excel and formatted nicely, but you are correct in that Tableau doesn't export it exactly as you design it. The CSV export via this method will give you the same result as the tabcmd option. There's currently no way to get the same view as the underlying sheet that I know of.
ReplyDeleteI followed all the steps indicated, I was able to download the csv file, but I am facing a weird issue.
ReplyDeleteMy csv download works correctly if the data to be downloaded has approx 900 records, if it's more than that, all I get is a blank csv file.
Has anyone else faced this, or knows any workaround.
I've never seen that issue before. I always gets all of the data.
DeleteWe can export any sheet into CSV file format. http://localhost/views/ followed by Workbook name, dashboard name & Worksheet name.
ReplyDeletehttp://localhost/views/workbookname/dashboardname/worksheetname.csv
Example:
http://localhost/views/Sales/GrowthofWalmart/WMMap.csv
Hi, this is an awesome tip. Is there any way to also export the underlying data of the fields of a blended table? I can export the primary data sources tables but not the blended secondary table's fields
ReplyDeleteI would think this trick will work if you included data from a blended table into the table that's being exported. I say that because Tableau is simply exporting that table. That being said, I haven't tried it.
DeleteI didn't see any additonal comments on how to re-order the columns so they are not alphabetical. Is there a way to do this? Thanks!
ReplyDeleteI have not seen a way to order the column output.
Deletei am missing the steps on how to create a sheet into an excel icon. please advise
ReplyDeleteOps23, the Excel icon is just that, an icon. Add an image object to the dashboard, choose an Excel icon, then add a hyperlink.
DeleteHi Andy, thanks for the great tip!
ReplyDeleteJust a quick question about the URL, which I have to add to the image object.
I am working with a workbook on my desktop and, in such case, what kind of URL should I add to the image object?
The point of this post is to make the CSV accessible on Server. For a local file, typically the format file://host/path will work.
DeleteHi Andy. How would one reference a particular dashboard/worksheet using the file format? I'm also working with local (packaged) workbooks. For example, I've tried "file://host/path/[workbook name.twbx] | [dashboard name]" with no results.
DeleteThanks.
Daniel, the export functionality does not allow you to choose a specific sheet. As I outlined, it uses the first worksheet in a dashboard alphabetically. An option might be to publish the additional sheet, but hide the tab and then call that tab.
DeleteHi Andy,
DeleteThank you for good stuff and knowledge shared.
Can you please explain to me how to run CSV export on a local file. I think my url format to local file is bad. I did the same thing as Daniel and I am getting nothing.
Hence, what exactly do I need to do in order to make it work?
Thanks,
Stefan Nikolic
This is a nice tip, Andy. Thanks! I, too, am having some issues downloading the user-filtered output. When I upload my visualization to our Tableau server, the only csv file that downloads only shows the output from the last filters I applied prior to uploading to the server, regardless what changes I make to filter values when using the server version of the visualization.
ReplyDeleteI understand I can reference quick filters in the URL, but only with static, pre-entered values (e.g. Region=Central). I need the filter values to behave dynamically in response to use input in my server version of the visualization. Is this possible?
So it's back to the Bat Cave Batman.
ReplyDeleteThe ONLY way to get what we want is to have the user click the standard Export - CrossTab built into Tableau server. Opening the workbook will not work since it assumes you are starting a brand new session and so only your default (published) filters and params are available. Using any kind of URL will only work if you have single params to pick from (or max/min dates to pass). Since this only covers a small number of use cases, we must get the user to click an embedded worksheet on a dashboard and then use the Tableau standard export. In my case we were trying to do this with a 300,000 row download. So the last thing we want is to tax the vizSQL engine with rendering all that data. I think this approach may provide adequate speed although it is sinfully ugly.
Assume you already have a dashboard with some filters (multi-select) etc. Then do this:
1. Create a worksheet with the data you want on Details. Nothing on rows or columns.
2. Ensure filters are global or applied to this worksheet from your "driver" worksheet.
3. Choose Mark Type "Shape" and select one you like - I chose a circle.
4. Make the Shape bigger and squish the screen down to show just a few.
5. Put an instruction Title on such as: "To Export Details, Click on the circle below and then click on Export (icon above) and choose Crosstab".
6. Go to your dashboard and drag the worksheet on whereever you want.
7. Publish and test. The user will have to click in the circle to "Highlight" it and then do the export.
For more fun: Since you are embedding a live worksheet on your dashboard it will take extra time to process. Get around this by adding a Boolean filter that the user can checkmark with a title such as "Fetch Details for export". The circle will disappear when this is false and reappear when it is true. Oh my gosh - it almost looks like workflow. Except it's ugly!
Thoughts? Improvements?
Thanks for the detailed suggestion Damian!
ReplyDeleteSomeone mentioned that they would like to see one row for an order date followed by columns of Sales, Profit, Profit Ratio. Easy to do, just change the AExport worksheet to have the these as 'blue pills' - that is, make each of the measures discrete and place each on the Row shelf. The new sheet should have all as blue pills - Order Date, Sum(Sales), Sum(Profit), Agg(Profit Ratio).
ReplyDeleteThe resulting csv opened by Excel then looks like this (except that column information really lines up):
Order Date Profit Ratio Profit Sales
10/17/2009 -43.19% ($455) $1,053
10/18/2009 4.13% $458 $11,102
Brad, I was hopeful that this was the solution but no luck.
DeleteUsing Andy's method Tableau is performing a Data export vs a Crosstab export. This is frustrating for 2 reasons.
1) The export doesn't hold it's shape. Even when the Measures are converted to discrete. (Plus it's in alphabetical order...yuck)
2) It takes much much longer to process. I did these 2 simple tests using the manual method of clicking the icons...
- Crosstab generates in about 1 sec and outputs a table 2465x20 cells = 49,300 cells
- Data generating is a 2 step process and takes about 2-3 sec. It generates a huge table 17249x15 = 258735 cells
Although manually it is pretty fast using Andy's method, clicking the icon to generate, takes over 30 seconds. Yikes!
Additionally, even though the export as Data method does look pretty, I tell my users that the output format is more Pivot Table friendly. That seems to make them happy'ish.
Sam
Hello All,
ReplyDeleteI am doing everything exactly the way it showed here. I can download a file when I click on image.
But the file is blank. What am I doing wrong here. This is frustrating.
Please guide.
im having the same trouble, any one knows why?
DeleteAfter a little testing it appears that the order you drag the worksheets into the dashbord matters. When I dragged "AData" in before "Sales" it exported properly. When I dragged "Sales" in first, "AData" didn't export properly.
ReplyDeleteHi All,
ReplyDeleteI am using dual axis in my sheet. When I try to export the data in .csv format, It gives me underlying data. Is there anyway to export the data on the sheet in csv format.
Thank you,
Abhishek
This is a great tip! Is it possible to do with Tableau Packaged Workbooks accessed through Tableau Reader?
ReplyDeleteIf you have Tableau Reader then you can simply export the data.
DeleteIt'd be great to have this functionality of clicking an icon to export a csv from a Tableau Packaged Workbook as well. This is a much more intuitive interface for users. Do you know if it is possible? Thanks for the article!
DeleteTried this on an on-premise Tableau Server configuration, after clicking icon/url I get a 406 Not Acceptable error in IE, and Chrome and Firefox don't present any errors, but also do not open the file (nothing happens).
ReplyDeleteShould this work? Any ideas?
Found the problem (this may be specific to SQL Server data sources). If any of the data sources are set to live vs. extract, then the 406 occurs. Once I changed all my data sources to Extract, then the .csv trick worked.
DeleteThis is one of the best tip ever! Thanks for sharing. We miss you at FB :)
ReplyDeleteFor those who struggled with the filter sending the values to the export, I worked it out by creating a parameter and passed the value through the URL and a field value in the action filter. http://kb.tableau.com/articles/knowledgebase/view-filters-url
ReplyDeleteso it looked like this: http://public.tableausoftware.com/views/ExporttoCSV/Dashboard.csv?[insert_param_name]=[insert_param_value]
Excellent!! Thanks for sharing!
DeleteHI, does this mean every filter has to run through a parameter? I have 6 filters on my Dashboard for people to adjust the data as required. Thanks
DeleteHi Amyjolo, I tried by passing parameter by end of the URl, But I am not able to get filtered data. Could you please suggest me. how to resolve this.
DeleteURL : /views/MD-OperationsKSP-TestDownload/Dashboard.csv?DayDate=DayDate
This is great, except that it is for exporting only 1 sheet.
ReplyDeleteI have a dashboard with 3 sheets, and i want to have filters applied to all of them - and then be able to export - all of them. This doesn't seem possible using this method, due to the fact that only one of them can be made first in alphabetical order.
In your workbook, you can set the filter to apply to all sheets using the same datasource.
DeleteThen in your hidden data sheet (which is the one exporting) just build it to include all the data you need.
I did this, as i have 3 charts, but just built my hidden sheet to show the data i wanted. My issue is exporting once a user has set the filters.
Hi everyone. For those of you who have upgraded to Tableau Server 9.20, are you still able to use this method? I ask because I have a user saying this undocumented (and unsupported?) feature has not been working since our upgrade to Server 9.20 ...
ReplyDeleteI haven't experienced any problem with Server 9.2 using this method.
DeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteI am correct in stating the worksheet detail Aexport with white font still needs to be published for this to work?
ReplyDeleteIt wont get a URL without publishing, correct?
Correct, otherwise it'll export the next sheet alphabetically.
DeleteOk, thank you. Only concern is the worksheet is visible within the project on the server (creates some clutter). Wish could easily copy and paste from a view in Tableau--especially useful when using Tableau detail for a work list or queue to fix information in source systems, etc. Still a slick trick and perfect timing for a project I'm working on. Much Appreciated!
DeleteAny help what url to insert when working with local copy? I have a tableau version below 8.2, so I cannot publish it publicly. How can I open the report in the browser? What's the url?
ReplyDeleteHi,
ReplyDeleteI am trying to automate the download process in a script. I am not able to do it even though I pass the auth token in the header. Works if I login to the tableau from the browser. Any idea about what other headers need to be passed for making a REST call to download the views?
Thanks
R
Sorry, I haven't used the REST API, so I'm not sure. I'd consult the help documentation.
DeleteHi Andy,
ReplyDeleteFor some reason it's not working for me either. Followed the same examples as you did and created a sheet called "AExport" as well (added it to the dashboard, etc...) but as soon as I use a ".csv" extension in the hyperlink, it gives me an error of "Problem trying to load hyperlink." But if I leave the dashboard with the ".twbx" extension or file location, the hyperlink works for the folder location or opens up another dashboard just fine. Having trouble with the ".csv". Thoughts? I'm currently using Tableau Desktop 9.0. Does the version matter?
This comment has been removed by the author.
ReplyDeleteUnless somethings changed that I'm not aware of, it should work on Public. Public is merely Server after all.
DeleteAm I missing something then?
DeleteThis is the url I am trying to use so people can download our data: http://public.tableausoftware.com/views/FreshmanProfile/FreshmanProfile.csv
Like I said, I can get it to download when I am signed in to Tableau Public, but if I am signed out it just tries to get me to sign in to download it.
This worked for me - http://public.tableau.com/views/FreshmanProfile/FreshmanProfile.csv
DeleteNotice that it's public.tableau.com not public.tableausoftware.com.
hello sir,how did you embed the viz into website is there any information on this please share
ReplyDeleteI have a quick query on csv data export from tableau using URL. I have used this to extract the csv data export and I was able to create that successfully.
ReplyDeleteAs a next step, I have published the workbook on server and changes the filters to export the csv for a different set of filters but unfortunately no filters are working on the csv sheet I am exporting after changing filters.
For e.g. If I published the workbook with Region filter as “North America” and on server if I change the filter to “South Asia” and export the csv file I still gets the csv export for Region “North America”.
Please note: I have applied the filters to all the worksheets, so ideally if user changes any filter it should be applied to the sheet I am calling in URL but it looks like the csv file retains the filter applied while publishing the workbook. Is there a way to apply the filters to the csv export?
Hi, I'm trying to export a csv from the worksheet that dynamically adjusts based on the filters and parameters a user has selected. I'm able to dynamically pass the filter and parameter values to the url - however, when nothing is being filtered for, I get a blank worksheet. Has anyone experienced this problem/know a potential workaround.
ReplyDeleteThanks!
Chris
Hi,
ReplyDeleteThanks, this works. But I want to ask- if I have 3 charts on my dashboard and I want to download a separate csv for each graph, how can that be achieved?
Thanks
Garima
Hi,
ReplyDeleteNot sure if this would be of any help, but apparently all "new" format files ending in X (.twbx, .docx, .xlsx etc.) are compressed XML archives, which carry their own data within.
In a situation where I could see that the data source was a .CSV file, I simply right-clicked on the .twbx file, unzipped it in its own subfolder (I had 7-zip installed which adds the right-click context menu) and, within that unzipped folder, you will find a Data subfolder. My .CSV file was there in all its unadulterated glory.
I haven't tested for other types of embedded data sources, would be curious to hear if anyone else has come up with some more solutions.
Cheers,
--Mario
Hi Andy,
ReplyDeleteHave you had any success getting this to work with stories? It looks like the URL doesn't change from point to point within a story. TIA!
~Laura
Laura, story points don't have individual URLs like dashboards or worksheets, so you can't export them individually with this method.
DeleteHi Randy,
ReplyDeleteI did the same way but whenever i click the excel button its routing to the dashboard not downloading the .csv. Can you help me here?
Regards,
Nandha
Brilliant tip. thanks Andy. If there are 2 charts in the dashboard, which one does it pick to export?
ReplyDeleteWhichever one you specify. Read through the post again and you'll see.
DeleteThanks Andy
ReplyDeleteI've tried but have had two major issues: 1) I get duplicate entries in the resulting CSV equal to the number of entries I've included in the export sheet; and 2) The CSV extract includes all measures and their values in two columns - one with an identifier and another with the value. What I need is a single copy of each entry and for each measure to be separated into a unique column for easy of viewing.
ReplyDeleteSuch a neat tip, Andy - thank you!
ReplyDeleteAlso, you can use X/Y positioning under the layout options to place the AExport sheet entirely off the canvas -> no need to format and trying to hide the sheet on the dashboard.
I can't thank you enough for this tip! I've been having an issue over revealing some of the dataset to users, but not everything ... this works beautifully. Thank you!
ReplyDeleteIs anyone else having troubles getting this to work since the most recent update to Tableau? Whenever we try to use it now it keeps giving errors that there is nothing there.
ReplyDeleteIt will not work for me either. I'm using Tableau Server.
Deletehi Andy,
ReplyDeleteThe link to CSV - http://public.tableau.com/profile/andy.kriebel#!/vizhome/ExporttoCSV/Dashboard.csv does not seem to be working now. I thought I could implement your solution to my question posted on tableau community at https://community.tableau.com/thread/228829. Appreciate your help!
Swapnil
I contacted Tableau about why it was no longer working and they said they have implemented a new URL structure for accessing views with Tableau Public. That means adding the .csv to our URL's will no longer work to download summary data. They did mention that it still works for Tableau Server and Tableau Online, but for us who use Tableau Public it appears we are out of luck for the time being.
ReplyDeleteThanks for the update! Glad it still work on Server.
DeleteHi Andy,
ReplyDeleteEnjoyed reading through this blog concerning converting a viz to csv file (over three years of comments!!) A number of comments noted they wanted the csv to be dynamically filtered on the dashboard – manually completed adding the suffix: ?&dim1=wantedvalue at the end of the URL.
Perhaps the below method for dynamically filtering a view/csv by dimension(s) which might work - listed below:
1. When publishing the dashboard also publish the wanted viz/csv separately from the dashboard.
a. Copy the html path of the viz from the share menu listing the web path on the tableau web page.
2. At the Tableau Desktop create a view with wanted dimension(s) – creates distinct list of values.
3. Paste/Inserted a calculated field with the http path link to the viz web page published separately in quotes: e.g.: http://tableaupublic/view1.csv?&dem1= and append the wanted dimension
a. creates the link: http://tableaupublic/view1.csv?&dem1=dimension value
b. Set the mark to shape: excel icon (import icon to shape directory https://www.tableau.com/about/blog/2016/2/how-use-custom-shapes-filters-your-dashboard-50200)
c. Move the calculated dimension to Tooltips mark.
4. In dashboard create a url link action setting the field to the url link – set the action to menu setting – title the filter as ‘Click to Download to Excel’
5. Publish the dashboard and view.
6. Click on the excel icon which will bring up the menu action:
a. custom shapes: https://www.tableau.com/about/blog/2016/2/how-use-custom-shapes-filters-your-dashboard-50200
7. Hopefully the excel sheet will appear.
Note: spoke with the Tableau Help Desk trying to make the action a click rather than the menu clikc but no solution?
Thanks
Fantastic Peter! Thank you!
DeleteI'm trying to download the sample workbook and it is no longer available?
ReplyDeleteIt's fixed. Apparently Dropbox changed some things.
DeleteHi Andy,
ReplyDeleteThis was very helpful.
In this approach global filters are not applicable to the export file. Is there a way we can make global filters applicable?
Hi Andy, I put together a similar solution but to download directly in Excel. I was having problem with CSV due to a global audience and localization options (commas interpreted differently in different countries). I wrote a tutorial here: https://assemblinganalytics.com/post/exporting-a-tableau-viz-data-into-excel-html-excel-button
ReplyDeleteAlex
Hi Andy,
ReplyDeleteCan we pass quick filter to this URL and download the filtered data using .csv added to the URL? Example if i select state FL and City Orlando, when user click the excel image set with this URL, they should able to download only FL and Orlando filtered data .. the filter in the URL should change dynamically and download the data?
Yes, you can pass those are part of the URL string. The syntax is the same as when you search for two words in Google. You have to combine them. See this post. http://www.vizwiz.com/2012/11/tableau-tip-passing-filters-in-url-to.html
DeleteHi Andy,
ReplyDeleteI have 3 workbooks in a dashboard and could export only 1 out of 3, any suggestions?
You'd have to run 3 exports.
DeleteHere's a blog post with updated URLs for TWBX, PDF, PNG and CSV that can be used on Tableau Public. This should solve some of the issues raised in the comments.
ReplyDeletehttps://www.dataplusscience.com/UpdatedURLs.html
I love this idea and it works, but the data export formats the data very strangely when you have multiple measure values. Is there anyway to do the same kind of functionality, but similar to the download crosstab function in Tableau server?
ReplyDeleteStill works on server 10.1.1! Thank you! This is great!
ReplyDeleteHi. Did you tried by passing dynamic filter/parameter to export to csv file??
DeleteThere's also another way which gets the underlying data. Described here:
ReplyDeletehttp://meowbi.com/2017/02/14/csv-download-button-tableau-js-api/
Anyone have any luck with using the URL with a query param?
ReplyDeleteHi
ReplyDeleteIts not working for me I click on csv image, but it take me to your link https://public.tableau.com/profile/andy.kriebel#!/resource-404 and gives error
Which link are you clicking on? I checked the dropbox link at the end of the post and that works fine. You can also download the workbook from the interactive viz in the post.
DeleteBrenny, i had the same problem on tableau Public. Andy, the solution however continues to work on a Physical Tableau Server
DeleteThis will work if i don't hide the AExport sheet(10.5), but wont work if i hide the sheet..does any one come across this issue?
ReplyDeleteVasu, I suspect you’re not doing something right. You should definitely be able to hide the sheet.
DeleteAs long as they have access to the Server, yes it will work.
ReplyDeleteI can't get this to work - it keeps pulling the worksheet that is 2nd alphabetically. I'm using Tableau Desktop 10.4.2 and deploying to a Server 10.4 version.
ReplyDeleteI have a worksheet titled aExport added as a floating object with "Fit->Entire View".
I tried hiding, unhiding, shrinking to 1 pixel and also making it large. Same result every time. Any ideas?
This comment has been removed by the author.
DeleteI can't get this to work either. When I click on your excel icon above, I get https://public.tableau.com/profile/andy.kriebel#!/resource-404. I followed your instruction, named my sheet AExport, linked the image using this URL https://public.tableau.com/views/SCLS-Turnover/TurnoverDashboard.csv but get a similar error message https://public.tableau.com/profile/scls#!/resource-404. Could the move from http: to https: be causing issues? Is there another way to do this?
ReplyDeleteThis doesn't work on Tableau Public Jody. It's designed for Tableau Server.
DeleteGot it! I just saw your link to this post:https://www.dataplusscience.com/UpdatedURLs.html
ReplyDeleteI updated my URL to https://public.tableau.com/views/SCLS-Turnover/AExport.csv?:showVizHome=no
It works! THANKS!
Order of the column changes when i download the csv file.How do we fix it?
ReplyDeleteI need it in same column order as it is displayed in dashboard
You have no control over the order of the columns. Better yet, don’t allow the data to be exported. Once it is, you have no control anymore. 😊
Delete