sum() functino error
Status: Beta
Brought to you by:
thomasbley
if you define a SUM() for some rows, and the first row doeasn't have a value, then the SUM() function behave something like a CONCATENATE function.
to reproduce the error just load this sheet:
dbCells = [
[0,0,"1st value",""], // A1
[0,1,"2nd value",""], // A2
[1,1,"123",""], // B2
[0,2,"3rd value",""], // A3
[1,2,"123",""], // B3
[0,3,"tot",""], // A4
[1,3,"=sum(B1:B3)",""], // B4
];
Hello,
you can edit "<sgs-dir>/bin/ext/lib/simple_spreadsheet/spreadsheet.js", replace:
for (var i=0; i<arr.length; i++) result += arr[i];
with:
for (var i=0; i<arr.length; i++) result += arr[i]*1;
bye
Thomas