Services > Excel Services > Find/Replace Text |
Excel Web API services allows the user to perform basic text operations such as find a text in an excel sheet and replace a text in an excel sheet.
To use the Find/Replace text feature in an excel file, you need to use a GET method.
To find a text in an excel sheet, you need to use the GET method.
GET: http://<host>[port]/api/excel/{excel path}/{sheet name}/find
The following illustration depicts a request URL with parameters to find a text in an Excel file.
Parameter |
Values Supported |
Description |
ExcelPath |
xls, xlsx |
The excel file name that storage manager can recognize. |
Sheet Name |
String |
The sheet name (if not provide, find in all sheets). |
Text |
String |
Text you want to search in the excel file. |
Match Case |
String | Text you want to use for Match Case. |
Whole Cell |
String | Text you want to find in whole cell. |
Once you run the application, it will match the text provided in the URL and you will see the following elements in the output.
To replace a text in an excel sheet, you need to use the GET method.
GET: http://<host>[port]/api/excel/{excel path}/{sheet name}/replace
The following illustration depicts a request URL with parameters to replace a text in an Excel file.
The following table elaborates request URL parameters required to replace a text in an excel file.
Parameter |
Values Supported |
Description |
ExcelPath |
xls, xlsx |
The excel file name that storage manager can recognize. |
Sheet Name |
String |
The sheet name (if not provide, find in all sheets). |
Text |
String |
Text you want to search in the excel file. |
New Text |
String | Text you want to replace. |
Match Case |
Sting | Text you want to use for match case. |
Whole Cell |
String | Text you want to find in whole cell. |
Once you run the application, it will replace the text with new text specified in the request URL.