Formulas
Members
columnAxisSyncer
formulas.columnAxisSyncer : AxisSyncer | null
Index synchronizer responsible for syncing the order of HOT and HF’s data for the axis of the columns.
engine
formulas.engine : HyperFormula | null
The engine instance that will be used for this instance of Handsontable.
indexSyncer
formulas.indexSyncer : IndexSyncer | null
Index synchronizer responsible for manipulating with some general options related to indexes synchronization.
rowAxisSyncer
formulas.rowAxisSyncer : AxisSyncer | null
Index synchronizer responsible for syncing the order of HOT and HF’s data for the axis of the rows.
sheetId
formulas.sheetId : number | null
HyperFormula’s sheet id.
sheetName
formulas.sheetName : string | null
HyperFormula’s sheet name.
Methods
addSheet
formulas.addSheet([sheetName], [sheetData]) ⇒ boolean | string
Add a sheet to the shared HyperFormula instance.
| Param | Type | Description |
|---|---|---|
| [sheetName] | string null | optional The new sheet name. If not provided (or a null is passed), will be auto-generated by HyperFormula. |
| [sheetData] | Array | optional Data passed to the shared HyperFormula instance. Has to be declared as an array of arrays - array of objects is not supported in this scenario. |
Returns: boolean | string - false if the data format is unusable or it is impossible to add a new sheet to the
engine, the created sheet name otherwise.
destroy
formulas.destroy()
Destroys the plugin instance.
disablePlugin
formulas.disablePlugin()
Disables the plugin functionality for this Handsontable instance.
enablePlugin
formulas.enablePlugin()
Enables the plugin functionality for this Handsontable instance.
getCellType
formulas.getCellType(row, column, [sheet]) ⇒ string
Get the cell type under specified visual coordinates.
| Param | Type | Description |
|---|---|---|
| row | number | Visual row index. |
| column | number | Visual column index. |
| [sheet] | number | optional The target sheet id, defaults to the current sheet. |
Returns: string - Possible values: ‘FORMULA’ | ‘VALUE’ | ‘ARRAYFORMULA’ | ‘EMPTY’.
isEnabled
formulas.isEnabled() ⇒ boolean
Checks if the plugin is enabled in the handsontable settings. This method is executed in Hooks#beforeInit
hook and if it returns true then the Formulas#enablePlugin method is called.
isFormulaCellType
formulas.isFormulaCellType(row, column, [sheet]) ⇒ boolean
Returns true if under specified visual coordinates is formula.
| Param | Type | Description |
|---|---|---|
| row | number | Visual row index. |
| column | number | Visual column index. |
| [sheet] | number | optional The target sheet id, defaults to the current sheet. |
switchSheet
formulas.switchSheet(sheetName)
Switch the sheet used as data in the Handsontable instance (it loads the data from the shared HyperFormula instance).
| Param | Type | Description |
|---|---|---|
| sheetName | string | Sheet name used in the shared HyperFormula instance. |