interface ParsedNumberFormat {
    asDate: Date;
    canWrap: boolean;
    conditionalColor: AdjustedColor;
    displayText: string;
    formattedRuns: ParseNumberFormatRuns;
    isDateFormat: boolean;
    isTimeFormat: boolean;
    repeatChars: ParseNumberFormatCharPlaceHolder[];
    repeatPlaceholder: string;
    spacingChars: ParseNumberFormatCharPlaceHolder[];
}

Properties

asDate: Date

Return the value as a javascript date if possible. Will return null if not possible.

canWrap: boolean

If true then the text could wrap if it doesn't fit.

conditionalColor: AdjustedColor

If there is a conditional color then this is the color to use.

displayText: string

Never null

formattedRuns: ParseNumberFormatRuns

The displayText broken down into runs. This is useful for more complex layouts.

isDateFormat: boolean

If the format is a date format then this is true.

isTimeFormat: boolean

If the format is a time format then this is true.

From the '*' formatChar. A single character (usually a ' ' but can be anything)

Repeats the next character in the format enough times to fill the column to its current width. There shall not be more than one asterisk in one section of the format. If more than one asterisk appears in one section of the format, all but the last asterisk shall be ignored. [Example: if the number format is 0*x, and the value 3 is in the cell, the value 3xxxxxx is displayed. The number of x characters that are displayed in the cell varies based on the width of the column. end example]

repeatPlaceholder: string

If this is not null then the character should be displayed this many times. This is is used if the text does not fit or if the value doesn't render against the type correctly (for example a negative date)

Remarks

This is different than repeatChars in that it will only display the value and not any additional .

From the '_' formatChar. An array of single characters.

Skips the width of the next character. This is useful for lining up negative and positive values in different cells of the same column. [Example: The number format (0.0);(0.0) aligns the numbers 2.3 and the column even though the negative number is enclosed by parentheses. end example]