add_table_from_workbook method

add_table_from_workbook

Retrieves a table from the specified Excel workbook and adds it to the end of the given shape collection at the specified coordinates.

Returns

The table that was added to the shape collection.

@staticmethod
def add_table_from_workbook(shapes, x, y, workbook, worksheet_name, cell_range):
    ...
ParameterTypeDescription
shapesIShapeCollectionThe shape collection to which the table will be added.
xfloatThe X coordinate for positioning the table.
yfloatThe Y coordinate for positioning the table.
workbookIExcelDataWorkbookThe Excel workbook.
worksheet_namestrThe name of the worksheet that contains the table.
cell_rangestrThe cell range that defines the table (for example, “A1:D10”).

Exceptions

ExceptionDescription
RuntimeError(Proxy error(ArgumentException))Thrown when any required parameter is None or empty, or when the specified worksheet or cell range is invalid.
RuntimeError(Proxy error(InvalidOperationException))Thrown when the input data is in an unsupported format.

add_table_from_workbook

Retrieves a table from the specified Excel workbook file and adds it to the end of the given shape collection at the specified coordinates.

Returns

The table that was added to the shape collection.

@staticmethod
def add_table_from_workbook(shapes, x, y, workbook_path, worksheet_name, cell_range):
    ...
ParameterTypeDescription
shapesIShapeCollectionThe shape collection to which the table will be added.
xfloatThe X coordinate for positioning the table.
yfloatThe Y coordinate for positioning the table.
workbook_pathstrThe path to the Excel workbook file.
worksheet_namestrThe name of the worksheet that contains the table.
cell_rangestrThe cell range that defines the table (for example, “A1:D10”).

Exceptions

ExceptionDescription
RuntimeError(Proxy error(ArgumentException))Thrown when any required parameter is None or empty, or when the specified worksheet or cell range is invalid.
RuntimeError(Proxy error(IOException))Thrown when an I/O error occurs while accessing the workbook file.
RuntimeError(Proxy error(InvalidOperationException))Thrown when the input data is in an unsupported format.

add_table_from_workbook

Retrieves a table from the specified Excel workbook file and adds it to the end of the given shape collection at the specified coordinates.

Returns

The table that was added to the shape collection.

@staticmethod
def add_table_from_workbook(shapes, x, y, workbook_stream, worksheet_name, cell_range):
    ...
ParameterTypeDescription
shapesIShapeCollectionThe shape collection to which the table will be added.
xfloatThe X coordinate for positioning the table.
yfloatThe Y coordinate for positioning the table.
workbook_streamio.RawIOBaseA stream containing the workbook data.
worksheet_namestrThe name of the worksheet that contains the table.
cell_rangestrThe cell range that defines the table (for example, “A1:D10”).

Exceptions

ExceptionDescription
RuntimeError(Proxy error(ArgumentException))Thrown when any required parameter is None or empty, or when the specified worksheet or cell range is invalid.
RuntimeError(Proxy error(InvalidOperationException))Thrown when the input data is in an unsupported format.

See Also