XenoGuard Documentation

Format Cells

Actions » Windows » File Handling » Excel » Format Cells

The action Format Cells modifies the style or appearance of a specified range of cells in a worksheet.


[-] Hide
  1. Open the Windows node in the Workspace Explorer.
  2. Open the File Handling node.
  3. In the Excel node, select the Format Cells action.

Parameters:

The action 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.

Information The Sheet Name in an Excel file is listed as fixed values of the context scopes.
Information

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]

All values of the parameters are determined by the specified format.

Information 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 action 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 action in the "Then" branch is executed, otherwise the action in the "Else" branch. A notice of this action 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