NumberFormatOptions
언어별로 다르게 표현되는 숫자, 화폐, 회계 를 표시하기 위한 formatOption
Signature:
export interface NumberFormatOptions Remarks
javascript 표준 라이브러리를 이용해서 format을 수행한다. Intl.NumberFormat (opens in a new tab)참조
Properties
| Property | Type | Description |
|---|---|---|
| compactDisplay | "short" | "long" | |
| currency | string | |
| currencyDisplay | string | |
| currencySign | 'standard' | 'accounting' | |
| excelFormat | string | 엑셀 export 시 출력되는 서식 Excel의 '셀 서식 > 사용자 지정'에서 사용하는 서식 코드를 문자열로 입력 구조: [양수];[음수];[0];[텍스트] |
| localeMatcher | string | |
| maximumFractionDigits | number | |
| maximumSignificantDigits | number | |
| minimumFractionDigits | number | |
| minimumIntegerDigits | number | |
| minimumSignificantDigits | number | |
| notation | 'standard' | "scientific" | "engineering" | "compact" | |
| numberingSystem | string | |
| roundingIncrement | number | |
| roundingMode | 'ceil' | 'floor' | 'expand' | 'trunc' | 'halfCeil' | 'halfFloor' | 'halfExpand' | 'halfTrunc' | 'halfEven' | |
| roundingPriority | 'auto' | 'morePrecision' | 'lessPrecision' | |
| signDisplay | "auto" | "always" | "exceptZero" | "never" | |
| style | 'decimal' | 'currency' | 'percent' | 'unit' | |
| trailingZeroDisplay | 'auto' | 'stripIfInteger' | |
| unit | string | |
| unitDisplay | "short" | "long" | "narrow" | |
| useGrouping | true | false |
Properties Desc
compactDisplay
Type - "short" | "long"
currency
Type - string
currencyDisplay
Type - string
currencySign
Type - 'standard' | 'accounting'
excelFormat
엑셀 export 시 출력되는 서식
Excel의 '셀 서식 > 사용자 지정'에서 사용하는 서식 코드를 문자열로 입력
구조: [양수];[음수];[0];[텍스트]
Type - string
Remarks:
숫자의 경우 아래와 같이 지정할 수 있다.
-
천 단위 콤마 및 소수점 excelFormat: '#,##0.00'
-
음수는 빨간색, 0은 하이픈(-)으로 표시 excelFormat: '#,##0;[Red]-#,##0;-"'
자세한 사항은 number-format.com (opens in a new tab)을 참조
localeMatcher
Type - string
maximumFractionDigits
Type - number
maximumSignificantDigits
Type - number
minimumFractionDigits
Type - number
minimumIntegerDigits
Type - number
minimumSignificantDigits
Type - number
notation
Type - 'standard' | "scientific" | "engineering" | "compact"
numberingSystem
Type - string
roundingIncrement
Type - number
roundingMode
Type - 'ceil' | 'floor' | 'expand' | 'trunc' | 'halfCeil' | 'halfFloor' | 'halfExpand' | 'halfTrunc' | 'halfEven'
roundingPriority
Type - 'auto' | 'morePrecision' | 'lessPrecision'
signDisplay
Type - "auto" | "always" | "exceptZero" | "never"
style
Type - 'decimal' | 'currency' | 'percent' | 'unit'
trailingZeroDisplay
Type - 'auto' | 'stripIfInteger'
unit
Type - string
unitDisplay
Type - "short" | "long" | "narrow"
useGrouping
Type - true | false