diff options
author | Artem Kustikov <artem.kustikov@gmail.com> | 2020-12-12 11:17:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-12 16:17:00 +0800 |
commit | 61057c58d34c78232ad0a5c1702ea9fa25a7641a (patch) | |
tree | a7a50ca2707a9b5a0ea877d08d4e7c37198a7670 /cell.go | |
parent | 95d8920c8e99684eb4e5068e38d3e7e5d0409d4e (diff) |
Number format read fix (#741)
* fix UT-generated file names to be ignored
* fix cell value load with invalid number format ID
* fix PR issues
Diffstat (limited to 'cell.go')
-rw-r--r-- | cell.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -762,10 +762,15 @@ func (f *File) formattedValue(s int, v string) string { return v } styleSheet := f.stylesReader() + if s >= len(styleSheet.CellXfs.Xf) { return v } - numFmtID := *styleSheet.CellXfs.Xf[s].NumFmtID + var numFmtID int + if styleSheet.CellXfs.Xf[s].NumFmtID != nil { + numFmtID = *styleSheet.CellXfs.Xf[s].NumFmtID + } + ok := builtInNumFmtFunc[numFmtID] if ok != nil { return ok(v, builtInNumFmt[numFmtID]) |