.twb vs .twbx: What’s the difference?


.twb vs .twbx: What’s the difference?



Whenever you save your work in Tableau, the default file extension is .twb, or Tableau Workbook.  However, you have the option to save your work under a different extension, .twbx.

A .twbx file is a Tableau Packaged Workbook, meaning it is the original .twb file grouped together with the datasource(s) in one package.  .twbx files can be considered analogous to specialized zip files, in which these “zip” files contain all the information necessary to work in Tableau.   The primary advantage to using .twbx files is that analysis can be performed without network/internet connections to your data because your data is already present on your computer in this packaged file.

The .twb file alone is not enough to perform any analysis because it only contains Tableau’s instructions for interacting with a datasource.  In actuality, .twb files are XML files specially tailored to interact with datasources.  They are custom built to make the awesome visualizations that Tableau generates.  Here you can see a picture of a .twb file opened in Notepad++:

This particular workbook file is 1029 lines long.  Lines 21 and 22 detail information about the connection to a data source. 

The name of the data source: name=’Sample – Superstore Sales (Excel)’

The type of data source:  class=’excel’

The location of the data source:  filename=’C:\Users\bcarlton\Documents\My Tableau Repository (Beta)\Datasources\Sample – Superstore Sales (Excel).xls’   –    I’m working with one of the sample sources, so, naturally, this is found in the Tableau Repository directory.

If you examine lines 42 and 43, you can see the XML detailing the “Time to Ship” measure.  Some of the important information includes the following:

default aggregation setting: column aggregation=’Max’

data type:  datatype=’integer’

measure or dimension:  role=’measure’

formula for being calculated:  note the comment (// this is the number of days between the order and shipment ) and the calculation (datediff(‘day’,[Order Date],[Ship Date]) 

I could go in to much more detail, but a crash course in XML as well as a discussion of its flexibility is outside the scope of this post.  Again, this is here to illustrate that .twb files just contain instructions for interacting with data sources.  

To see the data/.twb package combination in a .twbx file, one can simply right-click on the .twbx file and choose “Unpackage.”  Like unzipping a .zip file, unpackaging the .twbx will extract and split the .twb from the data source.

Notice that in that directory, you can find the original data source.

It should be noted that I was connected live to this Excel data when I saved the .twbx file.  Your data source and the type of connection (internet vs local) dictate whether you can create .twbx files at all.  If you are connected to a database or server, you need to create a tableau data extract (.tde) before you can take advantage of the packaged workbooks. A .tde is a proprietary format that Tableau uses to process data.  Some files (like Excel workbooks and csv’s) can automatically be packaged in a .twbx file without needing to convert the data to an extract.

Again, it is quite advantageous to work with .twbx files so that you create visualizations based without an internet connection to your source.  Furthermore, .twbx files can be used in conjunction with Tableau Reader as well.  However, if your source is large, then creating an extract might result in a workbook in which the file is too large and impractical to use.

More About the Author

Care Quality Analytics We are so excited to be launching our new product “Care Quality Analytics” and thought what better way to do this than with a blog and ...
PYD118 – Catching Up with Journalist Alberto Cairo In this episode of Podcast Your Data, analytics consultants Emily Miley and Jack Hulbert catch up with podcaster, professor, author and ...

See more from this author →

Subscribe to our newsletter

  • I understand that InterWorks will use the data provided for the purpose of communication and the administration my request. InterWorks will never disclose or sell any personal data except where required to do so by law. Finally, I understand that future communications related topics and events may be sent from InterWorks, but I can opt-out at any time.
  • This field is for validation purposes and should be left unchanged.

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK


Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072