.commit() method breaks some formulas
urpizu opened this issue · comments
Being a formula in a random cell: =SUM($1:$2)
/ =SUM($A:$B)
After commit it's broken to: =SUM(R1:R2)
/ =SUM(C1:C2)
After some research, it's a Google Sheets API issue. While next methods are equivalent...
range.setValue(=R[0]) ~= range.setFormulaR1C1(=R[0])
It looks that .setValue()
can not recognize next R1C1 pattern, when .setFormulaR1C1()
can:
range.setValue(=R1:R2) !== range.setFormulaR1C1(=R1:R2)
I've been able to avoid the issue using the Item.commitFieldValue(field)
method.
Shall we close this issue now? Since yesterday PR, I don't think it is relevant anymore.
Woop, nope! This is the only issue we didn't fix with the yesterday PR! Sheetfu keeps breaking formulas when Item.commit() or Table.commit(). I'd keep it so future users can understand and find alternatives to the issue.