Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

SpreadsheetNumberFormatSyntax

Namespace OfficeIMO.Spreadsheet
Assembly OfficeIMO.Core
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

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

Returned or exposed by

Methods

public static SpreadsheetNumberFormatSyntax Parse(String format) #
Returns: SpreadsheetNumberFormatSyntax

Parses a number format while retaining every authored character.

Parameters

format System.String requiredposition: 0

Properties

public IReadOnlyList<SpreadsheetNumberFormatToken> Tokens { get; } #

Ordered lossless tokens.

public Boolean IsValid { get; } #

Whether all quoted and bracketed regions were terminated.

public Int32 SectionCount { get; } #

Number of authored format sections.

public Boolean 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 Boolean UsesGrouping { get; } #

Whether the first section requests thousands grouping.

public Int32 ScaleThousands { get; } #

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

public Int32 DecimalPlaces { get; } #

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