# IWorkNumberFormat

The recovered semantic numeric, temporal or text format of an iWork cell, independent of a destination format code.

Class 

`OfficeIMO.IWork`

**Namespace**

`OfficeIMO.IWork`

**Assembly**

`OfficeIMO.IWork`

**Source revision**

`5e5a2dda74b3` with working tree changes

**Source**

[IWorkNumberFormat.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.IWork/IWorkNumberFormat.cs#L22)

**Modifiers**

sealed

The recovered semantic numeric, temporal or text format of an iWork cell, independent of a destination format code.

## Inheritance

- object
- IWorkNumberFormat

## Usage

Explore 5 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 4

- Method [IWorkNumberFormat.CreateNumber](/api/iwork/officeimo-iwork-iworknumberformat/#method-createnumber-int32-boolean-officeimo-iwork-iworknegativenumberstyle)
- Method [IWorkNumberFormat.CreatePercentage](/api/iwork/officeimo-iwork-iworknumberformat/#method-createpercentage-int32-boolean-officeimo-iwork-iworknegativenumberstyle)
- Method [IWorkNumberFormat.CreateScientific](/api/iwork/officeimo-iwork-iworknumberformat/#method-createscientific-int32)
- Property [IWorkTableCell.NumberFormat](/api/iwork/officeimo-iwork-iworktablecell/#property-numberformat)

### Accepted by parameters 1

- Method [IWorkTableData.SetNumber](/api/iwork/officeimo-iwork-iworktabledata/#method-setnumber-int32-int32-double-officeimo-iwork-iworknumberformat) parameter `numberFormat`

Filter members 

Show inherited

## Methods

`public static IWorkNumberFormat CreateNumber(int decimalPlaces, bool thousandsSeparator = false, IWorkNegativeNumberStyle negativeStyle = Minus)` [#](#method-createnumber-int32-boolean-officeimo-iwork-iworknegativenumberstyle)

[IWorkNumberFormat.Creation.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.IWork/IWorkNumberFormat.Creation.cs#L10)

Creates an explicit decimal format for a newly created numeric table cell.

Parameters

**decimalPlaces int required**

The number of fractional digits, from zero through thirty.

**thousandsSeparator bool = false optional**

Whether to group digits using the receiving document's locale.

**negativeStyle OfficeIMO.IWork.IWorkNegativeNumberStyle = Minus optional**

How negative values appear.

Returns

`IWorkNumberFormat`

`public static IWorkNumberFormat CreatePercentage(int decimalPlaces, bool thousandsSeparator = false, IWorkNegativeNumberStyle negativeStyle = Minus)` [#](#method-createpercentage-int32-boolean-officeimo-iwork-iworknegativenumberstyle)

[IWorkNumberFormat.Creation.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.IWork/IWorkNumberFormat.Creation.cs#L18)

Creates an explicit percentage format. The stored numeric value is multiplied by one hundred for display.

Parameters

**decimalPlaces int required**

The number of fractional digits, from zero through thirty.

**thousandsSeparator bool = false optional**

Whether to group digits using the receiving document's locale.

**negativeStyle OfficeIMO.IWork.IWorkNegativeNumberStyle = Minus optional**

How negative values appear.

Returns

`IWorkNumberFormat`

`public static IWorkNumberFormat CreateScientific(int decimalPlaces)` [#](#method-createscientific-int32)

[IWorkNumberFormat.Creation.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.IWork/IWorkNumberFormat.Creation.cs#L22)

Creates a scientific format with zero through thirty fractional mantissa digits, a minus sign and no grouping.

Parameters

**decimalPlaces int required**

Returns

`IWorkNumberFormat`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public IWorkNumberFormatKind Kind { get; }` [#](#property-kind)

[IWorkNumberFormat.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.IWork/IWorkNumberFormat.cs#L22)

Gets the source scalar display family.

`public int? DecimalPlaces { get; }` [#](#property-decimalplaces)

[IWorkNumberFormat.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.IWork/IWorkNumberFormat.cs#L24)

Gets the explicit decimal count from zero through thirty, or null for Numbers' automatic mode, fractions, temporal or text formats. Scientific formats apply this count to the mantissa; fractions use FractionAccuracy instead.

`public bool ThousandsSeparator { get; }` [#](#property-thousandsseparator)

[IWorkNumberFormat.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.IWork/IWorkNumberFormat.cs#L26)

Gets whether the source requests digit grouping.

`public IWorkNegativeNumberStyle NegativeStyle { get; }` [#](#property-negativestyle)

[IWorkNumberFormat.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.IWork/IWorkNumberFormat.cs#L28)

Gets the source treatment of negative values.

`public string? CurrencyCode { get; }` [#](#property-currencycode)

[IWorkNumberFormat.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.IWork/IWorkNumberFormat.cs#L30)

Gets the source three-letter uppercase currency identifier, or null for other numeric formats. This does not imply a symbol or locale.

`public bool UseAccountingStyle { get; }` [#](#property-useaccountingstyle)

[IWorkNumberFormat.cs:32](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.IWork/IWorkNumberFormat.cs#L32)

Gets whether the source currency format requests accounting alignment and parenthesized negative amounts.

`public IWorkFractionAccuracy? FractionAccuracy { get; }` [#](#property-fractionaccuracy)

[IWorkNumberFormat.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.IWork/IWorkNumberFormat.cs#L34)

Gets the denominator precision for a fraction format, or null for other numeric families.

`public IWorkDurationFormat? DurationFormat { get; }` [#](#property-durationformat)

[IWorkNumberFormat.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.IWork/IWorkNumberFormat.cs#L36)

Gets the qualified duration units and label style, or null for other families.

`public IWorkDateTimeFormat? DateTimeFormat { get; }` [#](#property-datetimeformat)

[IWorkNumberFormat.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/5e5a2dda74b33242f1f075718ee568bb355c03ba/OfficeIMO.IWork/IWorkNumberFormat.cs#L38)

Gets the qualified source date/time pattern, or null for other families.

<!-- PowerForge markdown artifact sha256:01619B20B539303490D197B93459F2D25CF17FC772DDFA7ADAB354C28287BFB6 -->
