Skip to main content


attaches a handler to an inner event of Spreadsheet

on(name: string, callback: Function): void;


  • name: string - the event's name, case-insensitive
  • callback: function - the handler function

Example"StyleChange", function(id){
console.log("The style of cell "+spreadsheet.selection.get()+" is changed");

Related sample: Spreadsheet. Events

See the list of Spreadsheet events.

You can attach several handlers to the same event and all of them will be executed. If some of handlers return false, the related operations will be blocked. Event handlers are processed in the same order that they are attached.

Related articles

Event Handling