Task 741: .TWB File Format

Task 741: .TWB File Format

The .TWB file format is utilized by Tableau for workbooks and is fundamentally an XML-structured text file. It lacks binary components such as magic numbers or endianness specifications, as it adheres to standard XML conventions. The properties intrinsic to this format, derived from its structural definition within the file system, include the following key elements and attributes. These encompass the hierarchical XML structure, which defines the workbook's composition, including data sources, visualizations, and metadata. The list is organized hierarchically for clarity:

  • File Extension: .twb
  • MIME Type: application/xml
  • Encoding: UTF-8 (standard for XML files)
  • XML Declaration:
  • Root Element: <workbook>
  • Attributes:
  • version (e.g., "2025.1"): Indicates the Tableau version compatibility.
  • source-build (e.g., "2025.1.0"): Specifies the build number.
  • source-platform (e.g., "win" or "mac"): Denotes the originating platform.
  • Preferences Element: <preferences>
  • Contains settings such as color palettes.
  • Sub-elements: <color-palette> (attributes: name, type).
  • Datasources Element: <datasources>
  • Contains one or more <datasource> elements.
  • Sub-elements within <datasource> (attributes: name, inline, has-connection):
  • <connection> (attributes: class, server, port, dbname, schema, username, odbc-connect-string-extras).
  • <relation> (attributes: name, type; used for joins or custom SQL).
  • <metadata>: Defines field metadata.
  • Sub-elements: <record> (attributes: fields).
  • <columns>: Lists fields.
  • Sub-elements: <column> (attributes: name, datatype, role).
  • <aliases>: Field alias definitions.
  • <calculated-fields>: Custom calculations.
  • Sub-elements: <column> (attributes: calculation).
  • Parameters Element: <parameters>
  • Contains <parameter> elements (attributes: name, datatype, value).
  • Worksheets Element: <worksheets>
  • Contains <worksheet> elements (attributes: name).

Under Construction...