Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Get cell color Version 3 (Net)

Группа действийAction group: Excel 

Описание

Действие считывает цвет из указанной ячейки.

...

Description

The action gets the color from the specified cell.

Icon

...

Parameters

...

Input parameters 

  1. Контекст - Контекст действия для работы с Excel-документом;

  2. Столбец ячейки - Столбец ячейки, цвет из которой вернет действие. Например А;

  3. Индекс столбца - Индекс столбца ячейки, цвет из которой вернет действие;

  4. Строка ячейки - Строка ячейки, цвет из которой вернет действие. Например: 5;

Выходные параметры

  1. RGB цвет - Переменная, в которую будет записан цвет ячейки в формате RGB;

  2. Excel цвет - Переменная, в которую будет записан цвет ячейки в формате ExcelCellInteriorColor.

Настройки

...

Свойство

...

Описание

...

Тип

...

Пример заполнения

...

Обязательность заполнения поля

...

Параметры

...

Контекст

...

Контекст действия для работы с Excel-документом

...

Robin.Excel

...

Контекст excel

...

Да

...

Столбец ячейки

...

Столбец ячейки, цвет из которой вернет действие.

...

Robin.String

...

Нет

...

Индекс столбца

...

Индекс столбца ячейки, цвет из которой вернет действие.

...

Robin.Numeric

...

Нет

...

Строка ячейки

...

Строка ячейки, цвет из которой вернет действие.

...

Robin.Numeric

...

Да

...

  1. Context - The context of the action for working with an Excel document;

  2. Column of the cell - The column of the cell whose color the action will return. For example A;

  3. Column index - The column index of the cell whose color the action will return from;

  4. Row of the cell - The row of the cell whose color from which the action will return. For example: 5;

Output parameters

  1. RGB color - Variable to which the color of the cell will be written in RGB format;

  2. Excel color - Variable to which the cell color will be written in ExcelCellInteriorColor format.

Settings

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 string 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". 

Image Added

Solution

Use the actions "Open

...

RGB цвет

...

Переменная, в которую будет записан цвет ячейки в формате RGB

...

Robin.String

...

Excel цвет

...

Переменная, в которую будет записан цвет ячейки в формате ExcelCellInteriorColor

...

Robin.String

Особые условия использования

Действие не должно падать с ошибкой, если не получилось распознать название цвета. Код «RGB»должен возвращаться в любом случае. 

Пример использования 

Задача

Существует Excel-документ в котором есть желтая ячейка, необходимо получить ее цвет в текстовую переменную "Цвет". 

Image Removed

Решение

Воспользоваться действиями "Открыть", "Get cell color". 

Реализация

Implementation

  1. Assemble a robot scheme consisting of actionsСобрать схему робота, состоящую из действий:
  2. Настроить параметры для действия "Открыть"Customize the settings for the "Open" action:
    Настроить параметры для действия "Считать цвет ячейки"
  3. Configure the parameters for the "Get cell color" action:
  4. Запустить робота по кнопке "Старт" в верхней панели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".