@searsuite/sear-domain-format
Portable cell-format values and formatting contracts.
Format a value
- interfaceSpreadsheetErrorValue
-
property readonly code: stringproperty readonly kind: "error" - interfaceSpreadsheetFormatDisplay
-
Display metadata selected from one Excel number-format section.
property readonly color?: stringproperty readonly fillCharacter?: stringproperty readonly text: string - interfaceSpreadsheetFormatLocale
-
property readonly datePattern: stringproperty readonly dateTimePattern: stringproperty readonly decimalSeparator?: stringproperty readonly groupSeparator?: stringproperty readonly locale: stringproperty readonly timePattern: string - interfaceSpreadsheetTextValue
-
property readonly kind: "text"property readonly value: string - typeSpreadsheetFormatValue
-
type SpreadsheetFormatValue = string | number | boolean | null | undefined | SpreadsheetTextValue | SpreadsheetErrorValue | readonly SpreadsheetFormatValue[] | readonly readonly SpreadsheetFormatValue[][] - variableDefaultSpreadsheetFormatLocale
-
DefaultSpreadsheetFormatLocale: SpreadsheetFormatLocale - functionformatDollar
-
formatDollar(number: number, decimals: number, currencySymbol?: string): string - functionformatExcelDateTime
-
formatExcelDateTime(serial: number, pattern?: string, locale?: SpreadsheetFormatLocale): stringFormats an Excel date/time serial with date, clock, and elapsed-time tokens.
- functionformatExcelDisplay
-
formatExcelDisplay(value: SpreadsheetFormatValue, formatText: string, locale?: SpreadsheetFormatLocale): SpreadsheetFormatDisplay | SpreadsheetErrorValue | nullFormats a scalar value and preserves section-level visual metadata.
- functionformatExcelText
-
formatExcelText(value: SpreadsheetFormatValue, formatText: string, locale?: SpreadsheetFormatLocale): string | SpreadsheetErrorValue | null - functionformatFixed
-
formatFixed(number: number, decimals: number, noCommas: boolean): string - functionformatSpreadsheetNumber
-
formatSpreadsheetNumber(value: number, code: string, locale?: SpreadsheetFormatLocale): string | null
Parse dates and numbers
- interfaceExcelDateParts
-
property readonly day: numberproperty readonly month: numberproperty readonly phantomLeapDay?: booleanproperty readonly year: number - functionexcelDatePartsFromSerial
-
excelDatePartsFromSerial(serial: number): ExcelDateParts | null - functionparseNumberValue
-
parseNumberValue(source: string, decimalSeparator?: string, groupSeparator?: string): number | null
No matching API entries.