Format Cells
ActionStep Reference » Windows » File Handling » Excel » Format Cells
The ActionStep Excel Format Cells modifies the style or appearance of a specified range of cells in a worksheet.
- Open the Windows node in the Workspace Explorer.
- Open the File Handling node.
- In the Excel node, select the Format Cells ActionStep.
Parameters:
The ActionStep has the following input parameters:
NAME |
DESCRIPTION
|
---|---|
Path Name
|
Specifies the path of the Excel File. |
Sheet Name
|
The name of the worksheet to be formatted. |
First Row
|
The index value of the first row. |
Last Row
|
The index value of the last row.
|
First Column
|
The index value of the first column. |
Last Column | The index value of the last column. |
Font size [px]
|
The size of the font in pixels. |
Bold font
|
Sets the font face to be bold or not |
Alignment
|
Sets the alignment of the text to be either General, Left, Right, Justify, Center Continuous, or Distributed. |
Font
|
The type of font to be used. Lists derived from the installed fonts on a device. |
Fore Color
|
The foreground color of the text in a cell. |
Back Color
|
The background color of the cell. |
The Sheet Name in an Excel file is listed as fixed values of the context scopes. |
Allowed Context Scopes [Fixed, Local, Global]
All values of the parameters are determined by the specified format. |
Color names (i.e. blue, red, yellow) or long hex/short hex values (i.e. #0000FF or #00F) can be used as values for Fore Color and Back Color parameters. |
Results:
The ActionStep returns the following results:
NAME
|
DESCRIPTION
|
---|---|
Result
|
Confirms if the cells in the worksheet were successfully formatted or not.
Allowed Context Scope [Fixed] Allowed Data Type [Boolean] |
Example 1 (Format the header of a worksheet):
This example creates a formatted header row for a worksheet after retrieving the row and column information from the Excel file. If the header row is formatted, the ActionStep in the "Then" branch is executed, otherwise the ActionStep in the "Else" branch. A notice of this ActionStep is displayed via Message Box.
See other Excel operations:
Create File
Get Sheet Information
Add Sheet
Rename Sheet
Delete Sheet
Insert Data
Update Data
Get Data
Clear Cells
Delete Cells