How to get calculated cell value in ui.spreadsheet?
getCellValue(row, column) gives just the formula inside cell, however I want to get the calculated value with this formula.
Hello,
The results are stored in DataStore of datatable, so you should use such technique as
$$("$spreadsheet1").$$("cells").getItem(4)[7]
where getItem method to access the values
I tried to get the value as explained, but when I use this code, the valore is still the formula not the value:
onCellChange: function(row, column, value){
console.log(row);
console.log(column);
console.log(value);
var prodotto = $$("ss").getCellValue(row, 1);
var sheet = $$("ss").getCellValue(3, column);
var valore = $$("ss").$$("cells").getItem(row)[column];
console.log(prodotto);
console.log("Value:"+valore);
console.log(sheet);
}
This is the console log:
6 <—row
3 <----column
=CEILING($D61.09, 0.05) <----formula
1030 <-----prodotto
Value:CEILING($D61.09, 0.05) <----valore
68 <–sheet
If I enter $$(“ss”).$$(“cells”).getItem(6)[3]; in the console, manually I get the value:
7.35
How to get the value in this case (I need the value to save it)
Thanks