Convert Excel Chart to Image – Aspose.Cells Cloud REST API
This REST API demonstrates how to convert an Excel chart to an image using Aspose.Cells Cloud.
REST API
GET https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/charts/{chartNumber}?format={format}
Supported image formats include png, jpeg, bmp, tiff, and gif.
Request parameters
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| name | string | path | Document name. |
| sheetName | string | path | Worksheet name. |
| chartNumber | integer | path | The chart number. |
| format | string | query | The exported file format. |
| folder | string | query | The document folder. |
| storageName | string | query | Storage name. |
The OpenAPI Specification defines a publicly accessible programming interface and lets you carry out 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.
Error Handling
| HTTP Status | Meaning | Example JSON Body |
|---|---|---|
| 400 | Bad Request – invalid parameters | { "error": { "code": "InvalidParameter", "message": "The 'format' value is not supported." } } |
| 401 | Unauthorized – missing/invalid JWT token | { "error": { "code": "InvalidToken", "message": "Authorization token is missing or invalid." } } |
| 404 | Not Found – workbook, worksheet, or chart not found | { "error": { "code": "ResourceNotFound", "message": "Specified chart does not exist." } } |
| 500 | Internal Server Error – unexpected server condition | { "error": { "code": "ServerError", "message": "An unexpected error occurred." } } |
Cloud SDK Family
Using an SDK is the best way to speed up development. An SDK handles low‑level details and lets you focus on your project tasks. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code examples demonstrate how to call Aspose.Cells web services using various SDKs: