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.

Prerequisites

  1. Obtain a JWT access token and include it in the Authorization: Bearer <token> header of every request.
  2. Upload the source workbook to Aspose Cloud storage (or confirm it already exists).
  3. Know the storage name and folder path where the workbook resides.

PostWorkbookSaveAs 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": "sample.pdf",
        "Size": 10240,
        "Folder": "output",
        "Storage": "MyStorage"
      }
    ]
  }
}

HTTP Status Codes

Code Meaning Description
200 OK Filter applied successfully; response contains operation 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 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.