История страницы
...
Get cell color Version 3 (Net)
Группа действийAction group: Excel
Описание
Действие считывает цвет из указанной ячейки.
...
Description
The action gets the color from the specified cell.
Icon
Параметры
Входные параметры
Контекст - Контекст действия для работы с Excel-документом;
Столбец ячейки - Столбец ячейки, цвет из которой вернет действие. Например А;
Индекс столбца - Индекс столбца ячейки, цвет из которой вернет действие;
Строка ячейки - Строка ячейки, цвет из которой вернет действие. Например: 5;
Выходные параметры
RGB цвет - Переменная, в которую будет записан цвет ячейки в формате RGB;
Excel цвет - Переменная, в которую будет записан цвет ячейки в формате ExcelCellInteriorColor.
Настройки
...
Свойство
...
Описание
...
Тип
...
Пример заполнения
...
Обязательность заполнения поля
...
Параметры
...
Контекст
...
Контекст действия для работы с Excel-документом
...
Robin.Excel
...
Контекст excel
...
Да
...
Столбец ячейки
...
Столбец ячейки, цвет из которой вернет действие.
...
Robin.String
...
Нет
...
Индекс столбца
...
Индекс столбца ячейки, цвет из которой вернет действие.
...
Robin.Numeric
...
Нет
...
Строка ячейки
...
Строка ячейки, цвет из которой вернет действие.
...
Robin.Numeric
...
Да
...
Settings of parameters
Property | Description | Type | Example of filling in | Obligatory to fill in the field |
Parameters | ||||
Context | Action context for working with an Excel document | Excel instance | Excel context | Yes |
Column of the cell | The column of the cell whose color the action will return from. | String | No | |
Column index | The column index of the cell whose color the action will return from. | Numeric | No | |
Row of the cell | The cell row whose color the action will return from. | Numeric | Yes | |
Results | ||||
RGB color | Variable to which the color of the cell in RGB format will be written | String | ||
Excel color | Variable to which the cell color will be written in ExcelCellInteriorColor format | String |
Special conditions of use
The action should not return an error if it fails to recognize the color name. The code "RGB" should be returned in any case.
Example of use
Task
There is an Excel document that has a yellow cell, I need to get its color into the text variable "Color".
Solution
Use the actions "Open
...
RGB цвет
...
Переменная, в которую будет записан цвет ячейки в формате RGB
...
Robin.String
...
Excel цвет
...
Переменная, в которую будет записан цвет ячейки в формате ExcelCellInteriorColor
...
Robin.String
Особые условия использования
Действие не должно падать с ошибкой, если не получилось распознать название цвета. Код «RGB»должен возвращаться в любом случае.
Пример использования
Задача
Существует Excel-документ в котором есть желтая ячейка, необходимо получить ее цвет в текстовую переменную "Цвет".
Решение
Воспользоваться действиями "Открыть", "Get cell color".
Реализация
Implementation
- Assemble a robot scheme consisting of actionsСобрать схему робота, состоящую из действий:
- Настроить параметры для действия "Открыть"Customize the settings for the "Open" action:
Настроить параметры для действия "Считать цвет ячейки" - Configure the parameters for the "Get cell color" action:
- Запустить робота по кнопке "Старт" в верхней панелиLaunch the robot using the "Start" button in the top panel.
РезультатResult:
Программный робот отработал успешно. Цвет ячейки определен и записан в переменную "ЦветThe program robot completed successfully. The color of the cell is defined and written to the variable "Color".