Get Started
Usage API
More information

onWorksheetChange

onWorksheetChange

The callback function which is called when the specified range of the current sheet changes. Please note that the event is not called for the undo/redo operations.

Parameters:

Name Type Description
range ApiRange

The modified range represented as the ApiRange object.

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oRange = oWorksheet.GetRange("A1");
oRange.SetValue("1");
Api.attachEvent("onWorksheetChange", function(oRange){
    console.log("onWorksheetChange");
    console.log(oRange.GetAddress());
});
builder.SaveFile("xlsx", "onWorksheetChange.xlsx");
builder.CloseFile();