Convert Excel to HTML – Aspose.Cells Cloud API v3.0

This REST API converts a spreadsheet file to an HTML‑format file.

REST 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.

Query Parameters

Parameter Name Type Description
password string The password required to open the Excel file.
storageName string The name of the storage where the file is located.
checkExcelRestriction bool Indicates whether to check Excel file restrictions when modifying cells.

Request Body Parameter

Parameter Name Type Description
File file The spreadsheet file to be converted, supplied as the first part of the multipart request.

Response

The API returns a FileInfo object that contains the generated HTML file.

Field Type Description
Filename string Name of the HTML file (e.g., example.html).
FileSize int Size of the file in bytes.
FileContent string Base64‑encoded content of the HTML file.

FileInfo

Response Status Codes

Code Meaning Description
200 OK Compression succeeded; response contains compressed file 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 PostConvertWorkbookToHtml API with SDKs

PostConvertWorkbookToHtml API Specification

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.

Use Aspose.Cells Cloud SDKs

Using an SDK is the best way to speed up development. An SDK handles low‑level details so you can 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:

Other APIs that Implement This Function

FAQ

Q: How do I authenticate when calling the Excel‑to‑HTML conversion API?
A: Include an Authorization: Bearer <access-token> header obtained from the OAuth 2.0 /connect/token endpoint.

Q: What does the FileInfo response contain?
A: It returns three fields – Filename (string), FileSize (integer, bytes), and FileContent (Base64‑encoded HTML content).

Q: Which error codes might I encounter?
A: 400 (bad request), 401 (unauthorized), 404 (file not found), and 500 (internal server error). Each response includes an Error object with Code and Message.