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

Ключ

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

...

Get cell color Version 3 (Net)

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

Описание

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

Иконка

Image Removed

Параметры

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

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

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

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

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

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

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

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

Настройки

...

Свойство

...

Описание

...

Тип

...

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

...

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

...

Параметры

...

Контекст

...

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

...

Robin.Excel

...

Контекст excel

...

Да

...

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

...

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

...

Robin.String

...

Нет

...

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

...

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

...

Robin.Numeric

...

Нет

...

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

...

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

...

Robin.Numeric

...

Да

...

RGB цвет

...

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

...

Robin.String

...

Excel цвет

...

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

...

Robin.String

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

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

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

Задача

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

Image Removed

Решение

Воспользоваться действиями "Открыть", "Считать цвет ячейки", "Сохранить". 

Реализация

...

Description

The action gets the color from the specified cell.

Icon

Image Added

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

Image Added

Solution

Use the actions "Open", "Get cell color". 

Implementation

  1. Assemble a robot scheme consisting of actions:
    Image Added
  2. Customize the settings for the "Open" action:
    Image Added
  3. Configure the parameters for the "Get cell color" action:
    Image Added
  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". 

Image Added

Результат: 

Программный робот отработал успешно. Цвет ячейки определен и записан в переменную "Цвет". 

Image Removed