AddTableFromWorkbook()

ExcelWorkbookImporter::AddTableFromWorkbook(System::SharedPtr<Aspose::Slides::IShapeCollection>, float, float, System::SharedPtr<Aspose::Slides::Excel::IExcelDataWorkbook>, System::String, System::String) method

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

static System::SharedPtr<Aspose::Slides::ITable> Aspose::Slides::Import::ExcelWorkbookImporter::AddTableFromWorkbook(System::SharedPtr<Aspose::Slides::IShapeCollection> shapes, float x, float y, System::SharedPtr<Aspose::Slides::Excel::IExcelDataWorkbook> workbook, System::String worksheetName, System::String cellRange)

Arguments

ParameterTypeDescription
shapesSystem::SharedPtr<Aspose::Slides::IShapeCollection>The shape collection to which the table will be added.
xfloatThe X coordinate for positioning the table.
yfloatThe Y coordinate for positioning the table.
workbookSystem::SharedPtr<Aspose::Slides::Excel::IExcelDataWorkbook>The Excel workbook.
worksheetNameSystem::StringThe name of the worksheet that contains the table.
cellRangeSystem::StringThe cell range that defines the table (for example, "A1:D10").

Return Value

The table that was added to the shape collection.

Remarks

auto pres = System::MakeObject<Presentation>();
ExcelWorkbookImporter::AddChartFromWorkbook(pres->get_Slide(0)->get_Shapes(), 10.0f, 10.0f, workbook, worksheetName, cellRange);
pres->Save(u"result.pptx", SaveFormat::Pptx);

ExcelWorkbookImporter::AddTableFromWorkbook(System::SharedPtr<Aspose::Slides::IShapeCollection>, float, float, System::String, System::String, System::String) method

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

static System::SharedPtr<Aspose::Slides::ITable> Aspose::Slides::Import::ExcelWorkbookImporter::AddTableFromWorkbook(System::SharedPtr<Aspose::Slides::IShapeCollection> shapes, float x, float y, System::String workbookPath, System::String worksheetName, System::String cellRange)

Arguments

ParameterTypeDescription
shapesSystem::SharedPtr<Aspose::Slides::IShapeCollection>The shape collection to which the table will be added.
xfloatThe X coordinate for positioning the table.
yfloatThe Y coordinate for positioning the table.
workbookPathSystem::StringThe path to the Excel workbook file.
worksheetNameSystem::StringThe name of the worksheet that contains the table.
cellRangeSystem::StringThe cell range that defines the table (for example, "A1:D10").

Return Value

The table that was added to the shape collection.

Remarks

auto pres = System::MakeObject<Presentation>();
ExcelWorkbookImporter::AddChartFromWorkbook(pres->get_Slide(0)->get_Shapes(), 10.0f, 10.0f, workbookPath, worksheetName, cellRange);
pres->Save(u"result.pptx", SaveFormat::Pptx);

ExcelWorkbookImporter::AddTableFromWorkbook(System::SharedPtr<Aspose::Slides::IShapeCollection>, float, float, System::SharedPtr<System::IO::Stream>, System::String, System::String) method

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

static System::SharedPtr<Aspose::Slides::ITable> Aspose::Slides::Import::ExcelWorkbookImporter::AddTableFromWorkbook(System::SharedPtr<Aspose::Slides::IShapeCollection> shapes, float x, float y, System::SharedPtr<System::IO::Stream> workbookStream, System::String worksheetName, System::String cellRange)

Arguments

ParameterTypeDescription
shapesSystem::SharedPtr<Aspose::Slides::IShapeCollection>The shape collection to which the table will be added.
xfloatThe X coordinate for positioning the table.
yfloatThe Y coordinate for positioning the table.
workbookStreamSystem::SharedPtr<System::IO::Stream>A stream containing the workbook data.
worksheetNameSystem::StringThe name of the worksheet that contains the table.
cellRangeSystem::StringThe cell range that defines the table (for example, "A1:D10").

Return Value

The table that was added to the shape collection.

Remarks

auto pres = System::MakeObject<Presentation>();
ExcelWorkbookImporter::AddChartFromWorkbook(pres->get_Slide(0)->get_Shapes(), 10.0f, 10.0f, fStream, worksheetName, cellRange);
pres->Save(u"result.pptx", SaveFormat::Pptx);

See Also