20
0

Merge pull request #1 from KabylzhanA/nilFix

Update col.go
This commit is contained in:
KabylzhanA 2020-07-20 01:10:39 +06:00 committed by GitHub
commit 16265a2d63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
col.go
View File

@ -168,7 +168,7 @@ type NumberCol struct {
}
func (c *NumberCol) String(wb *WorkBook) []string {
if fNo := wb.Xfs[c.Index].formatNo(); fNo != 0 {
if fNo := wb.Xfs[c.Index].formatNo(); fNo != 0 && wb.Formats[fNo] != nil {
t := timeFromExcelTime(c.Float, wb.dateMode == 1)
return []string{yymmdd.Format(t, wb.Formats[fNo].str)}
}