SetCellFormula method: PSSpreadsheet class

Syntax

SetCellFormula(rownum, colnum, data)

Description

Use the SetCellFormula method to set a formula value for the specified cell in the active spreadsheet.

Parameters

Parameter Description

rownum

Specifies the row number for the cell.

colnum

Specifies the column number for the cell.

data

Specifies the formula value to be set in the cell.

Returns

(Optional) A Boolean value: True if the method completes successfully, False otherwise.

Example

The following example sets a formula as the value for the specified cell within the spreadsheet.

&rownum = 2;
&colnum = 2;
&data = "2+4";
&ssObject.SetCellFormula(&rownum, &colnum, &data);