# Find/Replace Text

## Content



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.

### Find a Text

To find a text in an excel sheet, you need to use the **GET** method.<br /><br />**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.<br /><br />![](https://cdn.mescius.io/document-site-files/images/66c72527-2495-47b0-9257-2ee31dae74e5/images/findatext.png)

The following table elaborates request URL parameters required to find a text in an excel file.<br /><br />

|   **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.

*   Sheet name
*   Row index
*   Cell index
*   Start index

### Replace a Text

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.<br /><br />**![](https://cdn.mescius.io/document-site-files/images/66c72527-2495-47b0-9257-2ee31dae74e5/images/replaceatext.png)**

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.