The formula is incorrect in the column containing spaces

Tags: #<Tag:0x00007f8b1cda0058> #<Tag:0x00007f8b2b73fe98>

formula is incorrect when an empty space is included in the column. It can be reproduced in the following ways.

The sum should be three, but it says four.

  function getData() {
    return [
      [1],
      [1],
      [1],
      [],
      ['=SUM(A1:A4)']
    ];
  }
  var example1 = document.getElementById('example1');
  var settings1 = {
    data: getData(),
    rowHeaders: true,
    colHeaders: true,
    contextMenu: true,
    formulas: true
  };
  
  var hot1 = new Handsontable(example1, settings1);
  hot1.setDataAtCell(0, 0, 2);
  hot1.setDataAtCell(1, 0, 2);
  hot1.alter('remove_row', 1, 1);

Thank you or sharing the issue scenario @kim.hyunhak

I have replicated the issue and added it to the https://github.com/handsontable/handsontable/issues/4668 as a case 2. That topic is a part of the new Formula plugin scope under issue https://github.com/handsontable/handsontable/issues/6466

I will keep you updated once we solve it.

1 Like

Hi @kim.hyunhak ,

We recently published a new major version - Handsontable v.9.0.0, where we used our own formula engine - HyperFormula. It went really well, and most of the issues are gone. I highly encourage you to give it a try.

Here https://handsontable.com/docs/9.0.0/tutorial-release-notes.html is a list of changes made in the version. And here, https://handsontable.com/docs/9.0.0/demo-hyperformula-integration.html is a bit more about the HyperFormula itself and the integration with Handsontable.
If you have any questions, I’ll be more than happy to help.

Hi @kim.hyunhak

We just fixed the mentioned issue. You can check it here https://jsfiddle.net/handsoncode/uszoxf4L/ (within Handsontable v12.4.0)

If you’d have any issue while updating to the newest version please send me an email at support@handsontable.com