This method of the NumberDataFormat class sets the format string.
public void setFormat(String value);
value | The string to be used to format numbers. The default format string is "#". |
Use the following guidelines to specify the format string:
Use 0 to display either the digit in the corresponding position or 0 if no digit is in that position.
Use # to display either the digit in the corresponding position or nothing if no digit is in that position.
To display static text within the format string, enclose the text in single quotation marks ('). Numerical symbols, such as the thousand separator (,) and decimal placeholder (.), do not require quotation marks. For example:
'Number:' #,##0.00