Вы просматриваете старую версию данной страницы. Смотрите текущую версию.

Сравнить с текущим просмотр истории страницы

« Предыдущий Версия 5 Текущий »

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

  • "Context" fill in
  • "To find" - Moscow
  • "Replace with" - Perm
  • "Replace option" - Replace all matches
  • "Case sensitive" - false
  • "Search method" - Full text search

2Replace first match

  • "Context" fill in
  • "To find" - Moscow
  • "Replace with" - Perm
  • "Replace option" - Replace the first matches
  • "Case sensitive" - true
  • "Search method" - Full text search

3Count register

  • "Context" fill in
  • "To find" - MOSCOW
  • "Replace with" - Perm
  • "Replace option" - Replace all matches
  • "Case sensitive" - true
  • "Search method" - Full text search

No changes.

Desired phrase not found.

4

Text not found

Failed full-text search method

  • "Context" fill in
  • "To find" - Nizhniy
  • "Replace with" - Perm
  • "Replace option" - Replace all matches
  • "Case sensitive" - false
  • "Search method" - Full text search

No changes.

Desired phrase not found.

5

Successful

Full-text search method


  • "Context" fill in
  • "To find" - Nizhniy Novgorod
  • "Replace with" - Perm
  • "Replace option" - Replace all matches
  • "Case sensitive" - false
  • "Search method" - Full text search

6By inclusion

  • "Context" fill in
  • "To find" - Nov
  • "Replace with" - ""
  • "Replace option" - Replace all matches
  • "Case sensitive" - false
  • "Search method" - Search by inclusion

7Starts with specified value

  • "Context" fill in
  • "To find" - Nizhniy
  • "Replace with" - "Veliky"
  • "Replace option" - Replace all matches
  • "Case sensitive" - false
  • "Search method" - Starting with text

8Ends with specified value

  • "Context" fill in
  • "To find" - g
  • "Replace with" - "Ufa"
  • "Replace option" - Replace all matches
  • "Case sensitive" - false
  • "Search method" - Ending with text

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

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


  • Нет меток