Skip to main content

beforeFormatChange

fires before the format of a cell is changed

beforeFormatChange: (cell: string, format: string) => void | boolean;

Parameters:

  • cell: string - the id of a cell
  • format: string - a new format applied for a cell

Returns:

True to change the format, false to prevent changing of the format.

Example

spreadsheet.events.on("beforeFormatChange", function(cell, format){
console.log("Format of cell "+spreadsheet.selection.getSelectedCell()+" will change");
});

Related sample: Spreadsheet. Events

The event is blockable. Return false to cancel changing of the format.

Related articles

Number formatting