Continuing the discussion from Autofilling in handsontable-ruleJS:
change the value of r and c variable to 0 before assignment into value=data[r][c]. it will work fine like
var r=index.row,
c = index.col
TO
var r = 0,
c = 0,
in Handsontable.formula.js