-
-
Notifications
You must be signed in to change notification settings - Fork 36
getCellFormula
Julian Halliwell edited this page Sep 20, 2021
·
6 revisions
Returns the formula for a cell as a string, or all formulas for the active sheet as an array of structs.
getCellFormula( workbook, row, column )
or
getCellFormula( workbook )
-
workbook
spreadsheet object
-
row
numeric: required ifcolumn
is specified. -
column
_numeric_required ifrow
is specified.
Chainable? Yes but ends the chain.
spreadsheet = New spreadsheet();
workbook = spreadsheet.new();
spreadsheet.addColumn( workbook,"1,1" );
spreadsheet.setCellFormula( workbook,"SUM(A1:A2)",3,1 );
theFormula = spreadsheet.getCellFormula( workbook,3,1 );
// return all formulas in a sheet
allFormulas = spreadsheet.getCellFormula( workbook );
The array of all formulas will contain a struct for each formula with the following keys:
formula
-
row
(number) -
column
(number)