Bulk Text Replacement in Local Excel Files - Find & Replace API

Replace specified text within local Excel spreadsheet files without cloud upload. Update content in workbooks efficiently using Aspose.Cells Find and Replace API for offline editing.

Replace Spreadsheet Content API

API Endpoint

PUT http://api.aspose.cloud/v4.0/cells/replace/content

Request Parameters:

Parameter Name Type Path/Query String/HTTPBody Description
Spreadsheet File FormData The local spreadsheet file to be processed. Supported formats include XLSX, XLS, ODS, CSV, etc.
searchText String Query The text string to search for within the specified worksheet and cell area.
replaceText String Query The text string that will replace all occurrences of searchText within the specified range.
worksheet String Query (Optional) The name of the worksheet where the find-and-replace operation will be performed. If omitted, the operation applies to the first worksheet.
cellArea String Query (Optional) The specific cell range (e.g., "A1:D20", "B5:F15") where the text search and replacement will occur. If omitted, the operation applies to all used cells in the specified worksheet.
region String Query (Optional) Sets the locale for text handling, which may affect case sensitivity and character encoding in search operations (e.g., "en-US", "fr-FR").
password String Query (Optional) If the uploaded spreadsheet is password-protected, provide the password to open and process the file.

Response

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

Error Codes

  • 400 Bad Request: Invalid Aspose.Cells Cloud API URI.
  • 401 Unauthorized: Invalid access token. Or invalid client id and secret.
  • 404 Not Found: The spreadsheet file not accessible.
  • 500 Server Error: The spreadsheet has encountered an anomaly in obtaining calculation data.

Where should we use the Replace content in Spreadsheet API?

  • Batch Cloud File Update: Modify the contents of multiple Excel files stored in cloud storage such as AWS S3 and Azure Blob
  • Dynamic population of cloud templates: Batch populate dynamic data for report templates stored in the cloud
  • Cross-region file synchronization: Synchronize the content consistency of Excel files in cloud storage in different geographical regions

Why should you use the Replace content in Spreadsheet API?

  • Developer-Friendly: Aspose.Cells Cloud offers SDK libraries in multiple languages, enabling quick development and comes with comprehensive documentation. Compared to building custom chart rendering solutions, this significantly reduces the development workload.
  • Reduced Labor Costs: Reduced the need for positions dedicated to document consolidation.
  • Pay-per-use: No upfront investment, only pay for API calls actually used.
  • Zero Maintenance Costs: No need to maintain servers, update software, or deal with compatibility issues.
  • Preserves complex Excel formatting in universally accessible PDF format.

How to Use the Replace content in Spreadsheet API with SDKs

OpenAPI Specification

The OpenAPI Specification defines a publicly accessible programming interface, allowing you to perform REST interactions directly from a web browser.

Use Aspose.Cells Cloud SDKs

Using the SDK is the best way to accelerate development. The SDK handles the underlying details, allowing you to simply implement replace content in spreadsheets for cells with minimal code. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.

The following code examples demonstrate how to interact with Aspose.Cells web services using various SDKs: