Convert an Excel File to Different Formats
Contents
[
Hide
]
This REST API converts an Excel file to different output formats.
The request is an HTTP PUT with multipart content (see RFC 2046 or RFC 1341).
The first part of the multipart body contains the data file, and the second part contains the save options.
Query Parameters
| Parameter Name | Type | Description |
|---|---|---|
format |
string | Target file format (e.g., CSV, XLS, HTML, PDF, XML, TXT, TIFF, PNG, JPG, GIF, EMF, BMP, MD, Numbers, WMF, SVG, etc.). |
password |
string | Password required to open the source Excel file. |
outPath |
string | Full path (including filename and extension) for a single output file, or folder path when multiple files are generated. |
storageName |
string | Name of the storage where the source file resides. |
checkExcelRestriction |
bool | When true, validates Excel restrictions before modifying cells or related objects. |
streamFormat |
string | Format of the input file stream. |
region |
string | Regional settings applied to the workbook. |
pageWideFitOnPerSheet |
bool | Adjusts page width to fit each worksheet when converting to PDF. |
pageTallFitOnPerSheet |
bool | Adjusts page height to fit each worksheet when converting to PDF. |
sheetName |
string | Name of the worksheet to convert. |
pageIndex |
string | Index of the page to convert (requires sheetName). |
onePagePerSheet |
bool | When true, generates one PDF page per worksheet. |
AutoRowsFit |
bool | Auto‑fits all rows in the workbook. |
AutoColumnsFit |
bool | Auto‑fits column widths in the workbook. |
Request Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
datafile |
data file | The Excel file placed in the first part of the multipart body. |
SaveOptions |
object | Save options placed in the second part of the multipart body. |
REST API
| API | Type | Description | Swagger Link |
|---|---|---|---|
/cells/convert |
PUT | Converts a workbook from request content to the chosen format. | PutConvertWorkBook |
The OpenAPI Specification defines a publicly accessible interface that enables direct REST interactions from a web browser.
cURL Example
curl -X PUT "https://api.aspose.cloud/v3.0/cells/convert?format=html" \
-H "accept: multipart/form-data" \
-H "Content-Type: multipart/form-data" \
-H "x-aspose-client: Containerize.Swagger" \
-d '{"File":{}}'
Cloud SDK Family
Using an SDK accelerates development by handling low‑level details, allowing you to focus on business logic. See the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code examples demonstrate how to call Aspose.Cells web services with various SDKs: