setFormat

sets a specified format to the value of a cell

void setFormat(string cell,string format);

Parameters

cellstringthe id of a cell the value of which should be formatted
formatstringthe name of the number format to apply to a cell value

Example

// applies the currency format to the cell A1
spreadsheet.setFormat("A1","currency");

See also
Back to top