-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
Description
value:1.1405000000000001
numfmtId:0(general)
format result:
excelize: 1.1405000000000001
excel:1.1405
Steps to reproduce the issue
option=&numfmt.DateOption{CultureInfo: numfmt.CultureNameZhCN}
value:="1.1405000000000001"
fmtId:="0"
date1904 := false
result:=""
// result := numfmt.Format(value, fmtCode, date1904, numfmt.CellTypeNumber, option)
// fmt.Println(result)
if fmtCode, ok := customfmts[fmtId]; ok {
result = numfmt.Format(value, fmtCode, date1904, numfmt.CellTypeNumber, option)
fmt.Println(result)
}else{
numFmtID, _ := strconv.Atoi(fmtId)
if fmtCode, ok := numfmt.GetBuiltInNumFmtCode(numFmtID, option); ok {
result = numfmt.ApplyBuiltInNumFmt(option, value, fmtCode, numFmtID, date1904, numfmt.CellTypeNumber)
fmt.Println(result)
}else{
fmt.Println(value)
}
}
Describe the results you received
1.1405000000000001
Describe the results you expected
1.1405
Go version
1.24.1
Excelize version or commit ID
2.9
Environment
macos
Validations
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
No labels