Decrypt an Excel Workbook
Prerequisites
- An active Aspose Cloud account.
- A valid access token obtained from the Aspose Cloud OAuth endpoint (client ID and secret are required).
- The workbook you want to decrypt must be stored in a supported Aspose storage.
Authentication
All requests to the Cells API must include the Authorization header:
Authorization: Bearer <access_token>
Replace <access_token> with the token you obtained in the previous step.
Query Parameters
| Parameter Name | Type | Description |
|---|---|---|
| folder | string | Folder path of the original workbook. |
| storageName | string | Name of the storage where the workbook resides. |
Request Body Parameter
| Parameter Name | Type | Description |
|---|---|---|
| encryption | WorkbookEncryptionRequest | Encryption settings required for decryption. |
WorkbookEncryptionRequest
| Parameter Name | Type | Description |
|---|---|---|
| EncryptionType | string | Encryption algorithm (XOR, Compatible, EnhancedCryptographicProviderV1, StrongCryptographicProvider). |
| KeyLength | integer | Length of the encryption key in bits. |
| Password | string | Password used for decryption. |
REST API
| API | Type | Description | Swagger Link |
|---|---|---|---|
| /cells/{name}/encryption | DELETE | Decrypt a document | DeleteDecryptWorkbook |
The OpenAPI Specification defines a publicly accessible programming interface and lets you carry out REST interactions directly from a web browser.
You can use cURL to access Aspose.Cells web services easily. The following example shows how to call the Cloud API with cURL.
Edge‑Case Note
The API supports only the encryption algorithms listed in the EncryptionType field. Attempting to decrypt a workbook encrypted with an unsupported algorithm or using a key length that exceeds the algorithm’s maximum will result in a 400 BadRequest error.
Cloud SDK Family
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:
Next Steps
- Encrypt an Excel workbook – learn how to protect a file before uploading it.
- Protect an Excel workbook – explore additional security options such as password protection for worksheets.