setFormat

sets a custom format for a cell and returns the name of the format

string setFormat(number rowId,number columnId,string format, [string page] );
rowIdnumberthe row id
columnIdnumberthe column id
formatstringconditions for formatting the cell content, separated by semi-colons
pagestringoptional, the name of the sheet
stringthe name of the format

Example

$$("ssheet").setFormat(2, 2, "[>1000]> 0.0;[>100]Check 0,000.0#;[=0]Nope", "Sheet1");

Related samples

Details

Check the format details.

When a new column or row is added, new cells inherit the existing formats in the following way:

  • on adding a new row/rows, new cells inherit the format from the cells of the above row
  • on adding a new column/columns, new cells inherit the format from the cells of the column to the left
See also
Back to top
Join Our Forum
We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.
If you have not checked yet, be sure to visit site of our main product Webix web development library and page of javascript spreadsheet product.