SSpread.TypePercentNegStyle Property
Formats negative numbers in percentage cells.
Only valid for cells with the CellType property set to $CellTypePicture.
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 $TypePercentNegStyleIntl.
| Constant | Value | Explanation |
|---|---|---|
| $ TypePercentNegStyleIntl | 0 | Follow OS settings |
| $ TypePercentNegStyle1 | 1 | (1.1%) |
| $ TypePercentNegStyle2 | 2 | -1.1% |
| $ TypePercentNegStyle3 | 3 | 1.1 – % |
| $ TypePercentNegStyle4 | 4 | 1.1%- |
| $ TypePercentNegStyle5 | 5 | -1.1% |
| $ TypePercentNegStyle6 | 6 | 1.1%- |
| $ TypePercentNegStyle7 | 7 | 1.1 – % |
| $ TypePercentNegStyle8 | 8 | (1.1%) |
Negative numbers can be displayed in red by setting the TypeNegRed property to $TRUE.
This property is subject to property inheritance for percentage cells .
Example of use
Col = 3;
Row = 2;
CellType = $ CellTypePercent;
TypePercentNegStyle = $ TypePercentNegStyle1;
Value = -0.123;
BlockMode = $ TRUE;
Col = 3;
Row = 3;
Col2 = 5;
Row2 = 5;
CellType = $ CellTypePercent;
TypePercentNegStyle = $ TypePercentNegStyle3;
Value = -0.456;
BlockMode = $ FALSE;
Related item
CellType, TypeNegRed properties.