RangeApplyStyle method: PSSpreadsheet class
Syntax
RangeApplyStyle(StyleName, startrow, rowcount, startcol, colcount)
Description
Use the RangeApplyStyle method to set the style of the range of cells.
Note:
Due to Apache POI restrictions for user defined style lookup, the implementation of the RangeApplyStyle method is based on the following:
Every workbook should contain a sheet named PSSTYLESHEET.
The STYLESHEET sheet must create unique names on the first row in different cells.
The custom style sheet must be applied to the cell that contains the unique names.
Parameters
| Parameter | Description |
|---|---|
|
StyleName |
Specifies the style for the Excel sheet. Possible style names are:
|
|
startrow |
Specifies the starting row number. |
|
rowcount |
Specifies the number of rows. |
|
startcol |
Specifies the starting column number. |
|
colcount |
Specifies the number of columns. |
Returns
(Optional) A Boolean value: True if the method completes successfully, False otherwise.
Example
&StyleName ="PSInt";
&startrow = 2;
&rowcount = 3;
&startcol = 2;
&colcount = 3;
&ssObject.RangeApplyStyle(&StyleName, &startrow, &rowcount,&startcol, &colcount);