Batch Lock Excel Files

This REST API allows batch locking of eligible Excel files.

REST API

POST http://api.aspose.cloud/v3.0/cells/batch/lock

Security and Authentication

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

Request Parameters

Parameter Name Type Location Description
BatchLockRequest BatchLockRequest body JSON body containing lock parameters.

BatchLockRequest Properties

Name Type Description Notes
SourceFolder string Folder that contains the source Excel files. optional
MatchCondition MatchConditionRequest Conditions used to select which files to lock. optional
Password string Password to apply to the locked files. optional
OutFolder string Destination folder for the locked files. optional

MatchConditionRequest Properties

Name Type Description Notes
RegexPattern string Regular‑expression pattern to match file names. optional
FullMatchConditions string[] Exact file‑name matches for locking. optional

Request Body Parameter

Parameter Name Type Description
data file Binary content of the workbook file to create.

Response

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

HTTP Status Codes

Code Meaning When Returned
200 OK Workbook created successfully Normal flow
201 Created Workbook created (alternative response) When the API returns a created status
400 Bad Request Invalid parameters Client‑side error
401 Unauthorized Missing or invalid token Authentication error
409 Conflict File exists and isWriteOver=false Conflict with existing file

How to Use the PostBatchLock API with SDKs

PostBatchLock 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 the cURL command‑line tool 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 fastest way to develop. An SDK abstracts low‑level details so you can focus on your lock 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: