getFormat

returns the number format applied to the value of a cell

string getFormat(string cell);

Parameters

cellstringthe id of a cell

Returns

stringthe format applied to the value of a cell

Example

var format = spreadsheet.getFormat("A1"); 
// ->"currency"

Related samples

Details

Starting with v4.1, the reference to a cell can be specified in the following format:

var cellFormat = spreadsheet.getFormat("sheet1!A2"); //-> "number"

where sheet1 is the name of the tab.

In case the name of the tab isn't specified, the method will return the format applied to the value of a cell from the tab that is currently active.

See also
Back to top