Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.14 KB

File metadata and controls

54 lines (37 loc) · 1.14 KB
title API reference
layout docs
  • TOC {:toc}

Workbooks

class Workbook(filename):

The Workbook class represents a tableau workbook. It may be either a TWB or TWBX, and the library will handle packaging and unpackaging automatically.

Params:

filename takes a string representing the path to the workbook file.

Raises:

TableauVersionNotSupportedException if the workbook is not a supported version. TableauInvalidFileException if the file is not a valid tableau workbook file.

Methods:

Workbook.save(self): Saves any changes to the workbook to the existing file.

Workbook.save_as(self, new_filename): Saves any changes to the workbook to a new file specified by the new_file parameter.

Properities:

self.worksheets: Returns a list of worksheets found in the workbook.

self.datasources: Returns a list of Datasource objects found in the workbook.

self.filename: Returns the filename of the workbook.

Datasources

class Datasource(dsxml, filename=None)

Connections

class Connection(connxml)

Fields

class Workbook(column_xml=None, metadata_xml=None)