6/14/2016
How To Convert Tableau Files: The Conversion Tool Explained
Note: Starting with Tableau 10.5 there is an "Export as Version" option in the File menu that will save your workbook back to 10.2. This works very well, except for Hyper extracts. If trying to convert 10.5 or later with a Hyper extract, you will need to delete the extract and then "Export as Version" and then replace the data source.
Last week I posted a new Tableau conversion tool here for converting Tableau files from one version of Tableau to a previous version of Tableau, for example, converting a Tableau 9.3 file back to 9.2 or a Tableau 10.x file back to Tableau 9.3. A big thank you to the Tableau community for all of the emails and tweets. Clearly this is something the community has been looking for and I hope it's helpful. I wanted to follow up with another post to explain how the conversion is done, provide further details about the tool itself and give a disclaimer. So here it goes.
How to convert Tableau files:
To convert a file from Tableau 9.3 to an earlier version of Tableau is pretty simple. Just modify the Tableau file in two places and you will generally have success in opening up the workbook in an older version of Tableau.
1.) Make a backup of your work before proceeding
2.) Change the version in the "Workbook" tag
3.) Change the version in the "Datasource" tag
Note - I don't typically change the "source-build=" section, mostly because I haven't had to and it will update when the file is resaved from a previous version of Tableau.
Both of these tags are in the opening few lines of the TWB file. Change the version from the current version to whatever version you are trying to convert to. Example: change version='9.3' to version='9.2'
Converting from Tableau 10 back to 9.3 or 9.2 is a bit more complicated than modifying the two instances of "version" like we do going from other versions back. Tableau 10 has added federated queries. Because of that, the XML is very different. Here's the additional steps that I added to convert 10 back to 9.
Steps to convert Tableau 10:
1.) Follow the same steps above that we used to convert previous versions of Tableau.
2.) Remove the "source-build". Example: "source-build='9.3.0 (9300.16.0315.0125)'"
The tags for steps 3-7 will be located throughout the TWB file and not just in the opening few lines as before. For every connection in the Tableau workbook do the following:
3.) Remove all of the opening tags for "<connection class='federated'>" (but leave the closing tag alone)
4.) Remove all of the opening tags for "<named-connections>"
5.) Remove all of the closing tags for "</named-connections>"
6.) Remove all of the instances of "<named-connections..."
7.) Remove the forward slash (the closing tag) at the end of the <connection class=..." statements. This will use the closing connection tag from the federated query tag that we deleted in step 3.
If the file you are converting is a TWBX, then use a zip utility first, for example 7-Zip, to unzip the files. In the zipped files, locate the TWB file. Follow the steps above on the TWB file and then zip it back together with the other files and save as a TWBX file.
How the conversion tool works:
The conversion tool completes the steps listed above for you automatically. Here are some things to know about the tool.
1.) The tool works completely on the client-side, so nothing is uploaded to my website or server. The TWB files are loaded in memory on your device and then shown in a text box in your browser. Through a series of string manipulation, I am modifying the TWB file and holding it in a variable. Once the changes are complete, I update the text box from that string. Also note, a TWB file does not contain any data.
2.) The download function simply saves the text from your device memory to a file. Nothing is saved on my server or anywhere on DataPlusScience. I have no tracking in place other than Google Analytics for website traffic monitoring.
3.) I am leveraging a Javascript package called zip.js which will unpack a zip file. I use this to unpack the TWBX file. This is also done in memory on your device. The contents of the TWB are loaded once you click on the TWB. Again, nothing saved on my website.
4.) The download defaults to your default download folder. By downloading the new file to your download folder, it will not overwrite the previous version of the file. In addition, I append text to the end of the filename to help indicate that the file was converted.
5.) If you prefer not to use the tool, you can follow the steps above to attempt a conversion without the tool. You are encouraged to make a backup of your work before doing so.
Disclaimer:
The Tableau conversion tool is not supported by Tableau Software or Data Plus Science, LLC. This tool is provided to you by Data Plus Science for you to use at your own risk. You are encouraged to make a backup of your work before using this tool.
No metadata or information is retained by the converter, or any affiliate of this website.
This tool is modifying the XML file. There is no guarantee that this will work for every file and every version of Tableau because the structure of the XML file has changed over time as new features have been added. For example, in Tableau 10 there is a new feature for clustering. Previous version of Tableau will not support this feature. In this case, the file may open in the previous version of Tableau, but the Clustering will show an error inside the Tableau workbook and the visualization will not render.
I hope you find this information helpful. If you have any questions feel free to email me at Jeff@DataPlusScience.com