diff options
author | xuri <xuri.me@gmail.com> | 2020-10-19 23:55:54 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2020-10-19 23:55:54 +0800 |
commit | 4834a058aa3f953a7010704f2358633ae6e1d492 (patch) | |
tree | 08fa4cd30047ebee2a6f5e84a0ac8ea2796e27f3 /cell.go | |
parent | 520aa679f34bafbc00626151075b0b123eceb516 (diff) |
This closes #714 and closes #715, fix wrong worksheet index returned by NewSheet in some case, fix panic on formatted value with no built-in number format ID
Diffstat (limited to 'cell.go')
-rw-r--r-- | cell.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -770,6 +770,9 @@ func (f *File) formattedValue(s int, v string) string { if ok != nil { return ok(v, builtInNumFmt[numFmtId]) } + if styleSheet == nil || styleSheet.NumFmts == nil { + return v + } for _, xlsxFmt := range styleSheet.NumFmts.NumFmt { if xlsxFmt.NumFmtID == numFmtId { format := strings.ToLower(xlsxFmt.FormatCode) |