Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

SpreadsheetNumberFormatSyntax

OfficeIMO.Spreadsheet

Namespace
OfficeIMO.Spreadsheet
Assembly
OfficeIMO.Core
Source revision
ba882f6b0d07 with working tree changes
Modifiers
sealed

Lossless, non-regex syntax model for Excel-style number formats. It distinguishes display literals from scaling operators and exposes the conservative common subset used by format adapters.

Inheritance

  • object
  • SpreadsheetNumberFormatSyntax

Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 1

Methods

public static SpreadsheetNumberFormatSyntax Parse(string format) #

Parses a number format while retaining every authored character.

Parameters

format string required

Properties

public string Text { get; } #

Exact authored format.

public IReadOnlyList<SpreadsheetNumberFormatToken> Tokens { get; } #

Ordered lossless tokens.

public bool IsValid { get; } #

Whether all quoted and bracketed regions were terminated.

public int SectionCount { get; } #

Number of authored format sections.

public bool IsPercentage { get; } #

Whether the first section contains an unquoted percentage-scaling operator.

public string? CurrencySymbol { get; } #

First currency symbol or code in the first section.

public bool UsesGrouping { get; } #

Whether the first section requests thousands grouping.

public int ScaleThousands { get; } #

Number of first-section commas that scale the displayed value by one thousand.

public int DecimalPlaces { get; } #

Digit placeholders following the first decimal separator in the first section.