Modify Password Protection of an Excel Workbook – Aspose.Cells Cloud

This REST API changes the write‑protection password of an existing Excel workbook.

Updating the write‑protection password programmatically allows you to rotate or replace passwords without downloading the file. It is especially handy when managing secured workbooks stored in Aspose.Cells Cloud storage.

REST API

PUT https://api.aspose.cloud/v3.0/cells/{name}/writeProtection

Security and Authentication

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

Request parameters

Parameter Name Type Location Description
name string path Name of the Excel workbook (required).
password string body (JSON) New write‑protection password to set (required).
folder string query Optional folder where the workbook is stored.
storageName string query Optional name of the storage service.

Response

{
  "Status":"OK",
  "Code":200
}

Http 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 PutDocumentProtectFromChanges API with SDKs

PutDocumentProtectFromChanges API Specification

The OpenAPI Specification defines the publicly accessible programming interface that lets you perform REST interactions directly from a web browser.

You can use the cURL command‑line tool to access Aspose.Cells web services easily. The cURL command below shows how to call the Cloud API.

Use Aspose.Cells Cloud SDKs

Using an SDK is the fastest way to develop. An SDK handles low‑level details, allowing you to focus on your business logic. Please check 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: