Convert an Excel File to Different Formats

REST API

This REST API converts an Excel file to various output formats.

PUT https://api.aspose.cloud/v3.0/cells/convert

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.

Security and Authentication

The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.

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

Response

{
    "Name": "ResponseFile",
    "DataType": {
        "Identifier": "File",
        "Reference": "Stream",
        "Name": "file"
    }
}

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 PutConvertWorkBook API with SDKs

PutConvertWorkBook API Specification

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":{}}'

Use Aspose.Cells Cloud SDKs

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: