Convert Excel to HTML
Aspose.Cells Cloud provides a robust REST endpoint that converts Excel workbooks (XLS, XLSX, CSV, etc.) into HTML documents. The operation returns a FileInfo object containing the generated HTML file (name, size, and Base64‑encoded content).
The Post Convert Workbook to HTML Web API
POST https://api.aspose.cloud/v3.0/cells/convert/html
Security and Authentication
The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.
Request Parameters
| Parameter Name | Type | Path/Query String/HTTPBody | Required | Description |
|---|---|---|---|---|
| File | File | FormData | File to upload | |
| password | String | Query | The password needed to open an Excel file. | |
| checkExcelRestriction | Boolean | Query | Whether check restriction of excel file when user modify cells related objects. | |
| region | String | Query | The regional settings for workbook. | |
| FontsLocation | String | Query | Use Custom fonts. | |
| storageName | string | Query | No | Name of the storage where the source file resides. |
Response
[
{
"Name": "FileInfo",
"DataType": {
"Identifier": "Class",
"Reference": "FileInfo"
}
}
]
Sample response headers
HTTP/1.1 200 OK
Content-Type: application/json
Error Responses
| Code | Meaning | Description |
|---|---|---|
| 200 | OK | The request completed successfully. |
| 400 | Bad Request | The request is malformed or one or more parameters are invalid. |
| 401 | Unauthorized | Authentication failed, or the JWT token is missing or expired. |
| 404 | Not Found | The requested workbook, worksheet, or resource was not found. |
| 413 | Payload Too Large | The uploaded file exceeds the allowed size limit. |
| 500 | Internal Server Error | The server encountered an unexpected error while processing the request. |
Note: The request must be sent as
multipart/form-data. The Excel file is the first part of the multipart body.
Example Request (cURL)
curl -X POST "https://api.aspose.cloud/v3.0/cells/convert/html?checkExcelRestriction=true®ion=en-US" \
-H "accept: multipart/form-data" \
-H "Authorization: Bearer <access-token>" \
-H "Content-Type: multipart/form-data" \
-F "File=@/path/to/your_workbook.xlsx"
Where should you use the Post Convert Workbook to HTML API?
- Web Archiving: Convert Excel reports to HTML for long-term preservation in web-friendly formats.
- Legacy System Integration: Embed Excel data into older web applications without client-side dependencies.
- Automated Reporting: Generate dynamic HTML dashboards from Excel templates via CI/CD pipelines.
How to Use the Post Convert Workbook to HTML API with SDKs?
API Specification
The Post Convert Workbook to HTML API Specification defines a publicly accessible programming interface and enables you to carry out REST interactions directly from a web browser.
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 use the API with short code.
Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code examples demonstrate how to make calls to Aspose.Cells web services using various SDKs: