Import a Table from an Excel Workbook
Contents
[
Hide
]
Introduction
Aspose.Slides Cloud API allows you to import a table from an Excel workbook and insert it as a shape on a presentation slide. You specify the source worksheet and the cell range that contains the data. The workbook can be uploaded as a file or referenced by its path in the storage. To define and add a table structure programmatically instead, see Add a Shape to a Slide.
API Information
| API | Type | Description | Resource |
|---|---|---|---|
| /slides/{name}/slides/{slideIndex}/shapes/fromExcelTable | POST | Imports a table from an Excel workbook and adds it to a slide. | ImportTableFromWorkbook |
Request Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| name | string | path | true | The name of a presentation file. |
| slideIndex | integer | path | true | The 1-based index of the target slide. |
| document | file | form | false | The Excel workbook to upload. Either document or workbookPath must be provided. |
| worksheetName | string | query | true | The name of the worksheet that contains the data. |
| cellRange | string | query | true | The cell range to import (e.g. A1:D10). |
| x | number | query | false | The X coordinate of the table shape on the slide, in points. |
| y | number | query | false | The Y coordinate of the table shape on the slide, in points. |
| workbookPath | string | query | false | The path to the workbook file in the storage. Used instead of document when the file is already stored. |
| workbookStorage | string | query | false | The name of the storage containing workbookPath. |
| password | string | header | false | The password to open the presentation. |
| folder | string | query | false | The path to the folder containing the presentation. |
| storage | string | query | false | The name of the storage containing the folder. |
Example
Import the data from the range “A1:D5” in the “Sheet1” worksheet of MyWorkbook.xlsx and add it as a table to the first slide of MyPresentation.pptx at position (50, 200).
cURL Solution
SDK Solutions
SDKs
Check Available SDKs to learn how to add an SDK to your project.