Posted 13 April 2020, 3:43 am EST
2.222222222222222e+26 how to format
there is two mthod
- C.Spread.Common.CultureManager.getCultureInfo(),
decimalSeparator = ‘,’,but not ‘exponent’ to set - export default class StringFormat extends GC.Spread.Formatter.GeneralFormatter {
constructor(format: string, cultureName: string) {
super(format, cultureName)
}
format(obj: Record<string, any>, formattedData: Record<string, any>) {
if (typeof obj === ‘number’) {
console.log(obj, formattedData)
return super.format(obj, formattedData)
} else if (typeof obj === ‘string’) {
if (isnumeric(obj)) {
return super.format(obj, formattedData)
}
}
return obj ? obj.toString() : ‘’
}
parse(str: string) {
return super.parse(str)
}
}
how to format …
