Find and replace Version 2 (.Net)
Action group: Excel
Description
The action finds and replaces the value in the Excel-document.
Action icon
Settings of parameters
Свойство | Англ. наименование | Описание | Тип | Пример заполнения | Обязательность заполнения поля |
---|---|---|---|---|---|
Параметры | |||||
Контекст | Context | Контекст действия для работы с Excel-документами | Robin.Excel | Да | |
Найти | Find | Значение, которое нужно найти. | Robin.String | Да | |
Заменить на | Replaced by | Значение, на которое будет заменен искомый текст. Если поле не заполнено, искомый текст будет вырезан из ячейки. | Robin.String | Нет | |
Режим замены | Replace mode | Выпадающий список из элементов: заменить первое совпадение, заменить все совпадения. Режим замены текста. | Robin.String | Да | |
Учитывать регистр | Case sensitive | Параметр, который учитывает регистр поиска. Если значение "true", будет учитываться регистр букв искомого значения. | Robin.Boolean | Нет | |
Метод поиска | Search method | Выпадающий список из элементов: полнотекстовый, по включению, начинается с указанного значения, оканчивается указанным значением. Правило, которое будет учитываться при поиске. | Robin.String | Да | |
Результаты | |||||
Результат | Result | Словарь с измененными ячейками, где ключ - это индекс ячейки, значение - значение ячейки. | Robin.Dictionary |
Special conditions of use
Examples of action practicing in different cases:
No. | Essence of the test | Table | Parameters | Resulting table |
---|---|---|---|---|
1 | Replace all matches + Do not count the register |
| ||
2 | Replace first match |
| ||
3 | Count register |
| No changes. Desired phrase not found. | |
4 | Text not found Failed full-text search method |
| No changes. Desired phrase not found. | |
5 | Successful Full-text search method |
| ||
6 | By inclusion |
| ||
7 | Starts with specified value |
| ||
8 | Ends with specified value |
|
Example of use
Task
There is a table with numbers, replace the values 22 with 2.
Solution
Use the "Open", "Find and replace", "Save" actions.
Implementation
- Assemble a robot scheme with the actions.
2. Set the "Open" action parameters.
3. Set the "Find and replace" action parameters.
4. Set the "Save" action parameters.
5. Click "Start" and see the result.
Result
The program robot completed successfully.
The desired replacement was made.