How to Convert Local Spreadsheet Table Data to an HTML File: Step‑by‑Step Guide
Contents
[
Hide
]
Export table data from a local Excel file to an HTML file using the Cloud API.
Convert Table to HTML API
Web API
PUT http://api.aspose.cloud/v4.0/cells/convert/table/html
Request Parameters:
| Parameter Name | Type | Path/Query String/HTTP Body | Description |
|---|---|---|---|
| Spreadsheet | File | FormData | Upload the spreadsheet file to be converted. |
| worksheet | String | Query | The worksheet name of the spreadsheet/Excel. |
| tableName | String | Query | The name of the table to convert. |
| outPath | String | Query | (Optional) The folder path where the converted file will be stored. The default value is null. |
| outStorageName | String | Query | The designated storage name for the output file. |
| fontsLocation | String | Query | Specify custom fonts for the conversion. |
| region | String | Query | Spreadsheet region/language setting (e.g., en-US, fr-FR). Influences number formatting, date parsing, and locale‑specific behavior. settings. |
| password | String | Query | The password required to access the spreadsheet file. |
Response
[
{
"Name": "ResponseFile",
"DataType": {
"Identifier": "File",
"Reference": "Stream"
}
}
]
Error Codes
- 400 Bad Request: Invalid Aspose.Cells Cloud API URI.
- 401 Unauthorized: Invalid access token, or invalid client ID and secret.
- 404 Not Found: The spreadsheet file is not accessible.
- 500 Server Error: The spreadsheet encountered an error while obtaining calculation data.
Where Should You Use the Convert Table to HTML API?
- Dynamic Web Content Generation: Convert selected Excel tables (e.g., pricing tables, schedules, product lists) into HTML snippets for direct embedding in websites, portals, or content‑management systems (CMS).
- Email Template Integration: Transform Excel‑based data tables (e.g., order summaries, reports) into HTML for inclusion in marketing or transactional emails, ensuring consistency across email clients.
- Dashboard & Reporting Tools: Display real‑time spreadsheet data in web dashboards without requiring full Excel rendering or complex grid components.
- Document Previews: Generate HTML previews of specific spreadsheet sections for quick online viewing (e.g., in document‑management systems).
Why Should You Use the Convert Table to HTML API?
- Preserves rich formatting: Maintains Excel’s cell styles—including fonts, colors, borders, alignment, and number formatting—in the resulting HTML, unlike plain CSV or text extraction.
- Selective data export: Convert only the necessary table (e.g., A1:D20), avoiding full‑file processing. Ideal for large spreadsheets where only a subset of data is needed.
- No Excel dependencies: Cloud‑based conversion eliminates the need for Excel installation or client‑side libraries. Works seamlessly in any environment with HTTP access.
- Developer‑friendly: Aspose.Cells Cloud offers SDK libraries in multiple languages, enabling quick development and comes with comprehensive documentation. Compared with building custom chart‑rendering solutions, this significantly reduces development workload.
- Cost‑effective: You can convert table data without first uploading the workbook, which saves storage space and reduces costs.
How to Use the Convert Table to HTML API with SDKs?
Convert Table to HTML API Specification
The Convert Table to HTML API Specification outlines a publicly accessible programming interface, allowing you to perform REST interactions directly from your web browser.
Use Aspose.Cells Cloud SDKs
Using the SDK is the fastest way to develop, as it abstracts low‑level details, allowing you to convert spreadsheet table data to an HTML file with minimal code. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code examples illustrate how to interact with Aspose.Cells web services using various SDKs: