Workbook
Properties
Section titled “Properties”| Property | Modifier | Type | Description |
|---|---|---|---|
sheets |
readonly |
readonly string[] |
The sheets’ names, in order. |
Methods
Section titled “Methods”addSheet()
Section titled “addSheet()”addSheet(name, rows?): CellChange[];Adds a sheet after the others; formulas that named it already read it now.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
rows? |
CellInput[][] |
Returns
Section titled “Returns”evaluate()
Section titled “evaluate()”evaluate(formula, sheet?): EngineValue | EngineValue[][];Works out a formula without putting it in a cell; references without a sheet are to sheet, or the first.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
formula |
string |
sheet? |
string |
Returns
Section titled “Returns”EngineValue | EngineValue[][]
formula()
Section titled “formula()”formula(cell): string | undefined;The formula in a cell as it was given (“=SUM(B2:B10)”), or undefined when it holds none.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cell |
string |
Returns
Section titled “Returns”string | undefined
get(cell): EngineValue;A cell’s value: “Prices!B2”, or “B2” on the first sheet.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cell |
string |
Returns
Section titled “Returns”EngineValue
getRange()
Section titled “getRange()”getRange(range): EngineValue[][];A range’s values, as rows: “Prices!A1:C10”.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
range |
string |
Returns
Section titled “Returns”EngineValue[][]
Call Signature
Section titled “Call Signature”set(cell, input): CellChange[];Puts a value or formula in a cell, or rows of them from that cell; returns every value that changed as a result.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cell |
string |
input |
| CellInput | CellInput[][] |
Returns
Section titled “Returns”Call Signature
Section titled “Call Signature”set(cells): CellChange[];Puts values and formulas in several cells at once.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cells |
Record<string, CellInput> |
Returns
Section titled “Returns”setName()
Section titled “setName()”setName(name, formula): CellChange[];Defines or changes a name, or removes it with null.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
formula |
string | null |