setFormatName

sets a format for a cell

void setFormatName(number row,number column,string name, [string page] );
rownumberthe row id
columnnumberthe column id
namestringthe name of the format
pagestringoptional, the name of the sheet

Example

var name = $$("ssheet").addFormat("[green]0.0");
$$("ssheet").setFormatName(1, 1, name);

Related samples

Details

Default number formats have predefined names:

  • price - for the Currency format;
  • int - for the Number format;
  • percent - for the Percent format;
  • date - for the Date format;
  • string - for the Text format.
$$("ssheet").setFormatName(3, 1, "price");
$$("ssheet").setFormatName(5, 1, "date");
See also
Back to top