SSpread.TypeNumberNegStyle Property
Formats negative numbers in numeric cells.
Only valid for cells with the CellType property set to $CellTypeNumber (numeric type).
Before setting this property, use the Col , Row properties, and so on to specify what to do.
Specify the following values. The initial value is $TypeNumberNegStyleIntl .
| Constant | Value | Explanation |
|---|---|---|
| $ TypeNumberNegStyleIntl | 0 | Follow OS settings |
| $ TypeNumberNegStyle1 | 1 | (1.1) |
| $ TypeNumberNegStyle2 | 2 | -1.1 |
| $ TypeNumberNegStyle3 | 3 | --1.1 1.1 |
| $ TypeNumberNegStyle4 | 4 | 1.1- |
| $ TypeNumberNegStyle5 | 5 | 1.1 - |
Negative numbers can be displayed in red by setting the TypeNegRed property to $TRUE.
This property is subject to property inheritance for numeric cells.
Example of use
Col = 3;
Row = 2;
CellType = $ CellTypeNumber;
TypeNumberNegStyle = $ TypeNumberNegStyle1;
Value = -1.23;
BlockMode = $ TRUE;
Col = 3;
Row = 3;
Col2 = 5;
Row2 = 5;
CellType = $ CellTypeNumber;
TypeNumberNegStyle = $ TypeNumberNegStyle3;
Value = -4.56;
BlockMode = $ FALSE;
Related item
CellType , TypeNegRed property