Author Topic: Concatenation instead of a sum in Excel Formula  (Read 823 times)

vsa

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 12
    • View Profile
Concatenation instead of a sum in Excel Formula
« on: November 25, 2021, 07:31:52 pm »
Hello,

Here is an important bug returning false (erroneous) values (screenshot 1):

https://jsfiddle.net/navswmr9/

All data types are float.
Code: [Select]
    $(function () {
        var data = [
            { col1: 11, col3: 44,       
              pq_fn: {                     
                    col4: 'A1+B1+C1'
            }
            },
            { col1: 11, col2: 22, col3: 44,         
              pq_fn: {                     
                    col4: 'A2+B2+C2'
            }
            }
];

        var obj = {
            height: 'flex',
            maxHeight: 600,
            scrollModel: { autoFit: true },
            showTitle: false,
            colModel: [
                { title: "col1", width: 40, dataType: "float", dataIndx: "col1"},
                { title: "col2", width: 40, dataType: "float", dataIndx: "col2" },
                { title: "col3", width: 100, dataType: "float", dataIndx: "col3"},
                { title: "=col1+col2+col3<br>(excel formula)", width: 100,
                dataType: "float", dataIndx: "col4"},
            ],
            dataModel: {
                data: data
            }
        };
        $("#grid_json").pqGrid(obj);
    });   

That happens when one of columns is empty.


In case of MS Excel (screenshot 2) there will be a correct sum of existing values in columns.

Thank you in advance.

Sincerely

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6308
    • View Profile
Re: Concatenation instead of a sum in Excel Formula
« Reply #1 on: November 29, 2021, 10:57:29 pm »
This has been fixed in v8.2.0