Save Excel Workbook – Aspose.Cells Cloud API
This REST API allows you to save an Excel file in different formats.
Before calling this endpoint, ensure you have a valid OAuth 2.0 access token and that the source workbook is stored in your Aspose Cloud storage.
REST API
POST https://api.aspose.cloud/v3.0/cells/{name}/saveAs
Security and Authentication
The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.
Path Parameter
| Parameter Name | Type | Description |
|---|---|---|
| name | string | The name of the Excel file. |
Query Parameter
| Parameter Name | Type | Description |
|---|---|---|
| newfilename | string | New file name for the saved document. |
| isAutoFitRows | string | If true, automatically fits all rows in the workbook. Default is false. |
| isAutoFitColumns | string | If true, automatically fits column widths in the workbook. Default is false. |
| folder | string | Folder containing the original workbook. |
| storageName | string | Name of the storage where the source file is located. |
| outStorageName | string | Name of the storage where the output file will be saved. |
| checkExcelRestriction | bool | Specifies whether to enforce Excel restrictions when modifying cells or related objects. |
| region | string | Regional settings applied to the workbook. |
| pageWideFitOnPerSheet | bool | Fit the page width to each worksheet when converting. |
| pageTallFitOnPerSheet | bool | Fit the page height to each worksheet when converting. |
| sheetName | string | Name of the worksheet to convert. |
| pageIndex | string | Index of the page to convert within the specified worksheet (requires sheetName). |
| onePagePerSheet | bool | When converting to PDF, generate one page per worksheet. |
Request Body Parameter
| Parameter Name | Type | Description |
|---|---|---|
| SaveOptions | Object | Save options supplied in the second part of the multipart request. |
Sample request body (JSON part of multipart request)
{
"SaveOptions": {
"SaveFormat": "pdf",
"CompressionLevel": 9
}
}
Response
The API returns a SaveResponse object.
{
"Status":"OK",
"Code":200,
"SaveResult":
{
"Documents":[
{
"Name":"xxxxx",
"Size":xxxxx,
"Folder":"xxxxxx",
"Storage":"xxxxx"
}
]
}
}
Response Codes
| Code | Description |
|---|---|
| 200 | Success – workbook saved. |
| 400 | Bad request – invalid parameters. |
| 401 | Unauthorized – authentication required. |
| 404 | Not found – source workbook does not exist. |
| 500 | Internal server error. |
How to Use the PostWorkbookSaveAs API with SDKs
PostWorkbookSaveAs API Specification
The OpenAPI Specification defines a publicly accessible programming interface and lets you perform REST interactions directly from a web browser.
You can use cURL to access Aspose.Cells web services easily. The example below shows how to call 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:
For other conversion scenarios, see the Convert Excel to PDF and Export Excel to CSV guides.