HotXLS Docs

TXLSXNumberFormats class

Unit: lxHandleX
Workbook-level custom number-format collection exposed by TXLSXWorkbook.NumberFormats

Description

Workbook-level custom number-format collection offered by TXLSXWorkbook.NumberFormats The class belongs to the XLSX facade (lxHandleX) and is reached from the owning workbook or worksheet, so application code does not normally create instances directly

Imported numeric and date styles

Incoming XLSX cell style indexes belong to the source workbook's cell-format table; an index on its own never identifies a numeric value as a date

The reader works from the imported cell format's actual number-format classification, so an integer format at style index 1 keeps numeric values and cached numeric formula results rather than applying date-system conversion

Actual imported date formats hold on to date typing and calendar values under the 1900 and 1904 date systems, a built-in date format sitting at input style indexes 0, 1 or 2 included

Ordinary save/reopen applies the same format identity rule; output style ordering redefines nothing about the meaning of an unrelated source style index

Recognized built-in formats on import and save

Recognized built-in XLSX formats keep their effective format codes after import, supported numeric, percentage, scientific, fraction, date/time, elapsed-time and text formats included; cell display and later save/reopen keep those format semantics

A retained code may be written as an equivalent workbook-local format definition, so callers do well to inspect the effective format code instead of depending on the original built-in identifier or a fixed NumberFormats pool position

Built-in format 15 uses D-MMM-YY, with an abbreviated month in place of a two-digit numeric month; month names follow the active formatting locale

This applies to recognized built-in codes and implies no new mapping for every locale-specific or unknown format identifier; see Date values and elapsed-time display for workbook-aware duration formatting

Properties

Count
Items

Methods

function Add
function IndexOf
function LookupOrAdd
procedure Clear

See also