Export Worksheet Area to PNG, PDF, CSV with Aspose.Cells Cloud API – Complete Guide
GET /cells/{name}/worksheets/{sheetName} API lets you convert a specified area of a worksheet to various file formats. Supported formats: XLS, XLSX, XLSB, CSV, TSV, XLSM, ODS, TXT, PDF, OTS, XPS, DIF, PNG, JPEG, GIF, BMP, WMF, TIFF, EMF, NUMBERS, FODS.
This guide shows how to export a specific cell range from an Excel worksheet to PNG, PDF, CSV, and more than 20 additional formats using the Aspose.Cells Cloud API. For related operations such as exporting an entire worksheet or converting a workbook, see the Export Entire Worksheet and Convert Workbook to PDF pages.
REST API
The OpenAPI Specification defines a publicly accessible programming interface and lets you perform REST interactions directly from a web browser.
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Workbook file name. |
sheetName |
string | Yes | Target worksheet name. |
format |
string | Yes | Desired output format (png, pdf, csv, …). |
area |
string | No | Cell range to export (e.g., B3:K8). |
verticalResolution |
int | No | Vertical DPI for raster formats. |
horizontalResolution |
int | No | Horizontal DPI for raster formats. |
folder |
string | No | Cloud storage folder that contains the file. |
storage |
string | No | Name of the storage service. |
Successful response
- 200 OK – Returns the requested file in binary format (PNG, PDF, CSV, etc.).
Error responses
| Status Code | Description |
|---|---|
| 400 | Bad request – missing or invalid parameters. |
| 401 | Unauthorized – authentication token is missing or invalid. |
| 404 | Not found – specified workbook or worksheet does not exist. |
| 500 | Internal server error – unexpected condition on the server. |
Example error payload
{
"error": {
"code": "InvalidParameter",
"message": "The 'area' parameter is malformed. Expected format: B3:K8."
}
}
You can use the cURL command‑line tool to access Aspose.Cells web services easily. The following example shows how to make a call to the Cloud API with cURL.
Cloud SDK Family
Using an SDK is the fastest way to develop. An SDK abstracts low‑level details, allowing you to focus on your project logic. 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: