ExcelWorkbookImporter

ExcelWorkbookImporter class

Provides functionality for importing content from an Excel workbook into a presentation.

Constants

NameValueDescription
WORKSHEET_NAMEworksheetName

WORKSHEET_NAME


addChartFromWorkbook

NameDescription
addChartFromWorkbook (ShapeCollection, float, float, ExcelDataWorkbook, String, int, boolean)Retrieves a chart from the specified Excel workbook and adds it to the end of the given shape collection at the specified coordinates.

Parameters:

NameTypeDescription
shapesShapeCollectionThe shape collection to which the chart will be added.
xfloatThe X coordinate for positioning the chart.
yfloatThe Y coordinate for positioning the chart.
workbookExcelDataWorkbookThe Excel workbook.
worksheetNameStringThe name of the worksheet that contains the chart.
chartIndexintThe zero-based index of the chart shape to insert. This index can be obtained using the IExcelDataWorkbook#getChartsFromWorksheet(String) function.
embedAllWorkbookbooleanIf true, the entire workbook will be embedded in the chart; if false, only the chart data will be embedded.

Returns: Chart

Error

ErrorCondition
ArgumentExceptionThrown when any required parameter is null, empty, or if the chart cannot be found in the workbook.

addChartFromWorkbook

NameDescription
addChartFromWorkbook (ShapeCollection, float, float, ExcelDataWorkbook, String, String, boolean)Retrieves a chart from the specified Excel workbook and adds it to the end of the given shape collection at the specified coordinates.

Parameters:

NameTypeDescription
shapesShapeCollectionThe shape collection to which the chart will be added.
xfloatThe X coordinate for positioning the chart.
yfloatThe Y coordinate for positioning the chart.
workbookExcelDataWorkbookThe Excel workbook.
worksheetNameStringThe name of the worksheet that contains the chart.
chartNameStringThe name of the chart to be added.
embedAllWorkbookbooleanIf true, the entire workbook will be embedded in the chart; if false, only the chart data will be embedded.

Returns: Chart

Error

ErrorCondition
ArgumentExceptionThrown when any required parameter is null, empty, or if the chart cannot be found in the workbook.

addChartFromWorkbookFromStream

NameDescription
addChartFromWorkbookFromStream (ExcelWorkbookImporter, ShapeCollection, float, float, ReadStream, String, String, boolean, Function)Retrieves a chart from the specified Excel workbook and adds it to the end of the given shape collection at the specified coordinates.

Parameters:

NameTypeDescription
excelworkbookimporterExcelWorkbookImporterlink to self
shapesShapeCollectionThe shape collection to which the chart will be added.
xfloatThe X coordinate for positioning the chart.
yfloatThe Y coordinate for positioning the chart.
workbookStreamReadStreamA stream containing the workbook data.
worksheetNameStringThe name of the worksheet that contains the chart.
chartNameStringThe name of the chart to be added.
embedAllWorkbookbooleanIf true, the entire workbook will be embedded in the chart; if false, only the chart data will be embedded.
callbackFunctioncallback(error, Returns) - Callback to be called when the method has completed

Returns: Chart

Error

ErrorCondition
InvalidOperationExceptionThrown when the input data is in an unsupported format.

addChartFromWorkbook

NameDescription
addChartFromWorkbook (ShapeCollection, float, float, String, String, String, boolean)Retrieves a chart from the specified Excel workbook and adds it to the end of the given shape collection at the specified coordinates.

Parameters:

NameTypeDescription
shapesShapeCollectionThe shape collection to which the chart will be added.
xfloatThe X coordinate for positioning the chart.
yfloatThe Y coordinate for positioning the chart.
workbookPathStringThe file path to the workbook containing the chart.
worksheetNameStringThe name of the worksheet that contains the chart.
chartNameStringThe name of the chart to be added.
embedWorkbookbooleanIf true, the workbook will be embedded in the chart; if false, the chart will link to the external workbook.

Returns: Chart

Error

ErrorCondition
InvalidOperationExceptionThrown when the input data is in an unsupported format.

addTableFromWorkbook

NameDescription
addTableFromWorkbook (ShapeCollection, float, float, ExcelDataWorkbook, String, String)Retrieves a table from the specified Excel workbook and adds it to the end of the given shape collection at the specified coordinates.

Parameters:

NameTypeDescription
shapesShapeCollectionThe shape collection to which the table will be added.
xfloatThe X coordinate for positioning the table.
yfloatThe Y coordinate for positioning the table.
workbookExcelDataWorkbookThe Excel workbook.
worksheetNameStringThe name of the worksheet that contains the table.
cellRangeStringThe cell range that defines the table (for example, “A1:D10”).

Returns: Table

Error

ErrorCondition
InvalidOperationExceptionThrown when the input data is in an unsupported format.

addTableFromWorkbook

NameDescription
addTableFromWorkbook (ShapeCollection, float, float, String, String, String)Retrieves a table from the specified Excel workbook file and adds it to the end of the given shape collection at the specified coordinates.

Parameters:

NameTypeDescription
shapesShapeCollectionThe shape collection to which the table will be added.
xfloatThe X coordinate for positioning the table.
yfloatThe Y coordinate for positioning the table.
workbookPathStringThe path to the Excel workbook file.
worksheetNameStringThe name of the worksheet that contains the table.
cellRangeStringThe cell range that defines the table (for example, “A1:D10”).

Returns: Table

Error

ErrorCondition
InvalidOperationExceptionThrown when the input data is in an unsupported format.

addTableFromWorkbookFromStream

NameDescription
addTableFromWorkbookFromStream (ExcelWorkbookImporter, ShapeCollection, float, float, ReadStream, String, String, Function)Retrieves a table from the specified Excel workbook file and adds it to the end of the given shape collection at the specified coordinates.

Parameters:

NameTypeDescription
excelworkbookimporterExcelWorkbookImporterlink to self
shapesShapeCollectionThe shape collection to which the table will be added.
xfloatThe X coordinate for positioning the table.
yfloatThe Y coordinate for positioning the table.
workbookStreamReadStreamA stream containing the workbook data.
worksheetNameStringThe name of the worksheet that contains the table.
cellRangeStringThe cell range that defines the table (for example, “A1:D10”).
callbackFunctioncallback(error, Returns) - Callback to be called when the method has completed

Returns: Table

Error

ErrorCondition
InvalidOperationExceptionThrown when the input data is in an unsupported format.