Aspose.Cells Cloud – Convert Excel Range to HTML
Convert a selected range of a local Excel workbook to an HTML file directly through Aspose.Cells Cloud. The conversion happens entirely on the cloud server, so you never need to upload the whole workbook or have Excel installed locally.
Convert Range to HTML API
PUT https://api.aspose.cloud/v4.0/cells/convert/range/html
The request body is multipart/form-data containing the spreadsheet file. All other options are supplied as query parameters.
Security and Authentication
The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.
Request Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Spreadsheet | File | FormData | Yes | The Excel workbook to convert. |
| worksheet | String | Query | Yes | Name of the worksheet that contains the range. |
| range | String | Query | Yes | Cell area to convert, e.g., A1:C10. |
| outPath | String | Query | No | Folder path where the resulting HTML file should be stored (default null). |
| outStorageName | String | Query | No | Name of the storage service for the output file. |
| fontsLocation | String | Query | No | Path to a custom fonts folder. |
| AutoRowsFit | Boolean | Query | No | Automatically fit all rows in the worksheet. |
| AutoColumnsFit | Boolean | Query | No | Automatically fit all columns in the worksheet. |
| region | String | Query | No | Locale identifier (e.g., en-US, fr-FR). Affects number/date formatting. |
| password | String | Query | No | Password for opening a protected workbook. |
| fontsLocation | String | Query | No | Custom fonts location. |
| region | String | Query | No | Spreadsheet region/language setting. |
| password | String | Query | No | Password for opening the spreadsheet file. |
Response
The API returns the converted HTML file as a binary stream (application/octet-stream).
[
{
"Name": "ResponseFile",
"DataType": {
"Identifier": "File",
"Reference": "Stream"
}
}
]
Sample Success Response (HTTP)
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="report.html"
Content-Length: 8423
<table>
<tr><th>Product</th><th>Price</th></tr>
<tr><td>Widget A</td><td>$10</td></tr>
<tr><td>Widget B</td><td>$15</td></tr>
</table>
Save the response body to a file (e.g., report.html) to view the rendered table in a browser.
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 Convert Range to Html API with SDKs?
OpenAPI Specification
The OpenAPI Specification outlines a publicly accessible API, enabling 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 the SDK is the fastest way to develop, as it abstracts away the low‑level details, allowing you to convert a range of data to an HTML file with minimal code.
Explore the complete list of Aspose.Cells Cloud SDKs in our GitHub repository.
The following code examples illustrate how to call Aspose.Cells web services using various SDKs. If loading from Gist is blocked, you can download the examples directly from the repository.