Set cell format Version 10 (Net)

Action group: Excel 


Description

The action sets the format of the values in the specified cell.

Action 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 in which the value format will be set

String


Нет

Column index

The column index of the cell in which the value format will be set

Numeric


Нет

Row of the cell

Cell row in which the value format will be set

Numeric


Да

Format

The format to be set in the selected cell

String


Да

Format mask

A mask to create a custom format. Rules for custom format masks:

1) Any custom text (kg, man, pc, etc.) or symbols (including spaces) must be enclosed in quotation marks.

2) You can specify several (up to 4) different format masks using semicolons. Then the first of the masks will be applied to the cell if the number in the cell is positive, the second if it is negative, the third if the cell content is zero, and the fourth if the cell contains text rather than a number. 

3) 0 (zero) - one mandatory placeholder (digit), i.e. this space in the format mask will be filled with a digit from the number that the user enters into the cell. If there is no number for this space, zero will be displayed. For example, if the mask 0000 is applied to the number 12, 0012 will be output, and if the mask 0.00 is applied to the number 1.3456, 1.35 will be output. 

4) # (grid) - one optional placeholder - roughly the same as zero, but if there is no number for the placeholder, nothing is outputted

5) (space) - used as a separator of groups of digits of three between thousands, millions, billions, etc.

6) [ ] - you can specify the font color in square brackets before the format mask. The following colors are allowed: black, white, red, blue, green, yellow, light blue

String


Нет

Special conditions of use 

None.

Example of use 

Task

There is an Excel document in which values are written. It is required to set the monetary format in cell C4. 

Solution

Use the actions “Open”, “Set cell format”, “Save”. 

Implementation

  1. Assemble a robot scheme from the actions: 
  2. Set the parameters for the “Open” action:
  3. Set the parameters for the “Set cell format” action:
  4. Set the “Save” action parameter:


  5. Launch the robot using the “Start” button in the top panel. 

Result 

The program robot completed successfully.

The monetary format has been successfully set in cell C4. 

  • Нет меток