AddTableFromWorkbook()
Contents
[
Hide
]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
| Parameter | Type | Description |
|---|---|---|
| shapes | System::SharedPtr<Aspose::Slides::IShapeCollection> | The shape collection to which the table will be added. |
| x | float | The X coordinate for positioning the table. |
| y | float | The Y coordinate for positioning the table. |
| workbook | System::SharedPtr<Aspose::Slides::Excel::IExcelDataWorkbook> | The Excel workbook. |
| worksheetName | System::String | The name of the worksheet that contains the table. |
| cellRange | System::String | The 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
| Parameter | Type | Description |
|---|---|---|
| shapes | System::SharedPtr<Aspose::Slides::IShapeCollection> | The shape collection to which the table will be added. |
| x | float | The X coordinate for positioning the table. |
| y | float | The Y coordinate for positioning the table. |
| workbookPath | System::String | The path to the Excel workbook file. |
| worksheetName | System::String | The name of the worksheet that contains the table. |
| cellRange | System::String | The 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
| Parameter | Type | Description |
|---|---|---|
| shapes | System::SharedPtr<Aspose::Slides::IShapeCollection> | The shape collection to which the table will be added. |
| x | float | The X coordinate for positioning the table. |
| y | float | The Y coordinate for positioning the table. |
| workbookStream | System::SharedPtr<System::IO::Stream> | A stream containing the workbook data. |
| worksheetName | System::String | The name of the worksheet that contains the table. |
| cellRange | System::String | The 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
- Typedef SharedPtr
- Class ITable
- Class IShapeCollection
- Class IExcelDataWorkbook
- Class String
- Class ExcelWorkbookImporter
- Class Stream
- Namespace Aspose::Slides::Import
- Library Aspose.Slides