Get cell color Version 3 (Net)
Action group: Excel
Description
The action gets the color from the specified cell.
Icon
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", "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".