Specifies a predefined format name for cells when using the format mask user interface.
<blox:formatName
index="formatNumber"
name="name"
/>
where:
| Argument | Default | Description |
|---|---|---|
| formatNumber | null | The index number of the format name to define or retrieve. Must be an integer between 1 and 15. |
| name | empty string | String defining the name of the specified format mask |
Every predefined formatMask property is assigned a predefined formatName. The property name is one of formatName1 through formatName15.
The following table lists the format name properties, their predefined names, and their associated format masks. The format names and number mask syntax may be different for language versions other than English.
| Format Name property | Format Name | Format Mask |
|---|---|---|
| formatName1 | No mask | |
| formatName2 | Negative red | #,##0.00;[red]-#,##0.00 |
| formatName3 | Negative red parenthesis | #,##0.00;[red](#,##0.00) |
| formatName4 | Parenthesis | #,##0.00;(#,##0.00) |
| formatName5 | Thousands | #,###K |
| formatName6 | Millions | #,###M |
| formatName7 | Percentage | ##0.00'%' |
| formatName8 | Dollars | $,##0 |
| formatName9 | Euros | #,##0.00;(#,##0.00) |
| formatName10 | 2 decimal places | #,##0.00 |
| formatName11 | Integer | 0 |
The following code allow the user to select a format name called “Negative red” with an associated number mask of #,##0.00;[red]-#,##0.00 from the format mask user interface.
<blox:formatMask
index="2"
mask="#,##0.00;[red]-#,##0.00" />
<blox:formatName
index="2"
name="Negative red" />