HotXLS Docs

TXLSXNumberFormat class

Stores one custom OOXML number-format code (a workbook-level string, e.g. #,##0.00); TXLSXNumberFormats is the workbook-level pool that deduplicates identical codes. Most callers never touch this class directly — set TXLSXCellFormatTXLSXNumberFormat class for HotXLS components

Syntax

TXLSXNumberFormat = class;
TXLSXNumberFormats = class;
    

Key members

FormatCodeWideString; the OOXML number-format code
AddAppends a format code to the pool and returns its index
IndexOfReturns the index of an existing pool entry equal to the given code, or -1 if not found
Count, ItemsTXLSXNumberFormats pool members: number of entries, and indexed access to each TXLSXNumberFormat

Example

This example formats the cells reached through CellFormat as currency with two decimal places; TXLSXCellFormat resolves the string into the workbook's TXLSXNumberFormats pool internally

CellFormat.NumberFormat := '$#,##0.00';

See also

TXLSXWorkbook class
TXLSXWorkbook class