orcus.xls_xml

orcus.xls_xml.read()

Read an Excel file from a specified file path and create a orcus.Document instance object. The file must be saved in the SpreadsheetML format.

Parameters
  • stream – file object containing byte streams.

  • recalc (bool) – optional parameter specifying whether or not to recalculate the formula cells on load. Defaults to False.

  • error_policy (str) – optional parameter indicating what to do when encountering formula cells with invalid formula expressions. The value must be either fail or skip. Defaults to fail.

Return type

orcus.Document

Returns

document instance object that stores the content of the file.

Example:

from orcus import xls_xml

with open("path/to/file.xls_xml", "rb") as f:
    doc = xls_xml.read(f, recalc=True, error_policy="fail")