Replace Text in an Excel Worksheet – Aspose.Cells Cloud API
Contents
[
Hide
]
This REST API replaces text in an Excel worksheet using the Aspose.Cells replace text API.
Security and Authentication
The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.
REST API
POST https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/replaceText
Request Parameters
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| name | string | path | The name of the Excel workbook. |
| sheetName | string | path | The name of the worksheet. |
| oldValue | string | query | The text to be replaced. |
| newValue | string | query | The replacement text. |
| folder | string | query | The folder that contains the file. |
| storageName | string | query | The storage service name. |
Response
{
"Status":"OK",
"Code":200,
"Workbook": {
"FileName": "test.xlsx",
"Links": [
{
"Href": "/test.xlsx",
"Rel": "self",
"Title": null,
"Type": null
},
{
"Href": "/test.xlsx",
"Rel": "alternate",
"Title": "Download As CSV",
"Type": "text/csv"
},
{
"Href": "/test.xlsx",
"Rel": "alternate",
"Title": "Download As HTML",
"Type": "text/html"
},
{
"Href": "/test.xlsx",
"Rel": "alternate",
"Title": "Download As ODS",
"Type": "application/vnd.oasis.opendocument.spreadsheet"
},
{
"Href": "/test.xlsx",
"Rel": "alternate",
"Title": "Download As PDF",
"Type": "application/pdf"
},
{
"Href": "/test.xlsx",
"Rel": "alternate",
"Title": "Download As Table Delimited Text Format",
"Type": "text/plain"
},
{
"Href": "/test.xlsx",
"Rel": "alternate",
"Title": "Download As TIFF",
"Type": "image/tiff"
},
{
"Href": "/test.xlsx",
"Rel": "alternate",
"Title": "Download As Microsoft Excel 2003",
"Type": "application/vnd.ms-excel"
},
{
"Href": "/test.xlsx",
"Rel": "alternate",
"Title": "Download As Microsoft Excel 2007",
"Type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
},
{
"Href": "/test.xlsx",
"Rel": "alternate",
"Title": "Download As XPS",
"Type": "application/vnd.ms-xpsdocument"
}
],
"Worksheets": {
"link": {
"Href": "/worksheets",
"Rel": "self",
"Title": null,
"Type": null
}
},
"DefaultStyle": {
"link": {
"Href": "/defaultstyle",
"Rel": "self",
"Title": null,
"Type": null
}
},
"DocumentProperties": {
"link": {
"Href": "/documentproperties",
"Rel": "self",
"Title": null,
"Type": null
}
},
"Names": {
"link": {
"Href": "/names",
"Rel": "self",
"Title": null,
"Type": null
}
},
"Settings": {
"link": {
"Href": "/settings",
"Rel": "self",
"Title": null,
"Type": null
}
},
"IsWriteProtected": "False",
"IsProtected": "False",
"IsEncryption": "false",
"Password": null
}
}
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 PostWorksheetTextReplace API with SDKs
PostWorksheetTextReplace API Specification
The OpenAPI Specification defines this publicly accessible interface.
You can use the cURL command-line tool to call the service:
Use Aspose.Cells Cloud SDKs
Using an SDK is the best way to speed up development. An SDK handles low‑level details, allowing you to 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: