Get value and cell while cell value change events trigger

Posted by: arun.gupta on 29 June 2018, 6:20 am EST

  • Posted 29 June 2018, 6:20 am EST

    There is a problem comes in getting changed value and cell, like in cell D6 value is 50 and cell D7 value is 30 and in cell D8(or it could be any cell) i am executing a formula =D6-D7 then it comes 20 here everything is good but when i type the D6 cell’s value to 80 then immediately cell D8(or it could be any cell) values is updated to 50 so how to get cell D8(or it could be any cell) and its value while im changing the cell D6.

    Please let me know is there any function to get access to D8(or it could be any cell) cell when my focus is not in this D8(or it could be any cell) cell.

    Here is the link of this explanation

    https://www.screencast.com/t/SUlVSok6t

  • Posted 2 July 2018, 8:19 am EST

    Hello,

    Hi Jason,

    RangeChanged event fires for Formula Update or Delete since these actions may involve multiple cells.

    Please use the code below:

    
         var spread,sheet;
         window.onload = function () {
             spread = new GC.Spread.Sheets.Workbook(document.getElementById("spreadSheet"), { sheetCount: 3 });
             sheet = spread.getActiveSheet();
             spread.options.allowUserEditFormula = true;
             //this event will fire for formula and value changed
             
              
             sheet.bind(GC.Spread.Sheets.Events.RangeChanged, function (sender, args) {
                 console.log(args.sheetName, args.action);
             });
         }
    

    Thanks,

    Deepak Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels