TRY NEW VERSION

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");
Api.attachEvent("onWorksheetChange", function(oRange){
    console.log("onWorksheetChange");
    console.log(oRange.GetAddress());
});
var oWorksheet = Api.GetActiveSheet();
var oRange = oWorksheet.GetRange("A1");
oRange.SetValue("1");
builder.SaveFile("xlsx", "onWorksheetChange.xlsx");
builder.CloseFile();

Resulting document