How to Convert a Local Spreadsheet Worksheet to a PDF File: Step‑by‑Step Guide
Convert a chart that resides in a workbook stored in Aspose Cloud Storage to a different file format (PDF, PNG, SVG, …) without downloading the source file.
ExportChartAsFormat API
GET https://api.aspose.cloud/v4.0/cells/{name}/worksheets/{worksheet}/charts/{chartIndex}
Security and Authentication
The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.
📦 Request Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| name | string | Path | Yes | Workbook file name. |
| worksheet | string | Path | Yes | Worksheet name that contains the chart. |
| chartIndex | integer | Path | Yes | Zero‑based index of the chart to export. |
| format | string | Query | Yes | Desired output format (e.g., png, pdf, svg). |
| folder | string | Query | No | Folder path where the workbook is stored (default: root). |
| storageName | string | Query | No | Custom storage name; omit to use the default storage. |
| outPath | string | Query | No | Folder path where the converted file will be saved. |
| outStorageName | string | Query | No | Storage name for the output file. |
| fontsLocation | string | Query | No | Path to a folder that contains custom fonts. |
| region | string | Query | No | Locale setting (e.g., en-US, fr-FR). |
| password | string | Query | No | Password for opening a protected workbook. |
Response
[
{
"Name": "ResponseFile",
"DataType": {
"Identifier": "File",
"Reference": "Stream",
"Name": "file"
}
}
]
HTTP Status Codes
| Code | Meaning | Description |
|---|---|---|
| 200 | OK | Filter applied successfully; response contains operation details. |
| 400 | Bad Request | Missing or invalid parameters (e.g., unsupported file type). |
| 401 | Unauthorized | Invalid or missing JWT token. |
| 413 | Payload Too Large | Uploaded file exceeds size limit. |
| 500 | Internal Server Error | Unexpected server error. |
How to Use the Export Chart as Format API with SDKs?
Export Chart as Format API Specification
The Export Chart as Format API Specification provides a publicly accessible programming interface and enables REST interactions directly from a web browser.
You can use the cURL command‑line tool to access Aspose.Cells web services easily. The following example shows how to make calls to the Cloud API with cURL.
Use Aspose.Cells Cloud SDKs
Using an SDK is the fastest way to develop, as it abstracts away low‑level details, allowing you to convert spreadsheet table data to a PDF file with minimal code. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code examples illustrate how to call Aspose.Cells web services using various SDKs: