summaryrefslogtreecommitdiff
path: root/cell.go
diff options
context:
space:
mode:
Diffstat (limited to 'cell.go')
-rw-r--r--cell.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cell.go b/cell.go
index eb60441..ebf4681 100644
--- a/cell.go
+++ b/cell.go
@@ -1292,6 +1292,9 @@ func (f *File) formattedValue(s int, v string, raw bool) string {
return v
}
styleSheet := f.stylesReader()
+ if styleSheet.CellXfs == nil {
+ return v
+ }
if s >= len(styleSheet.CellXfs.Xf) {
return v
}
@@ -1306,7 +1309,7 @@ func (f *File) formattedValue(s int, v string, raw bool) string {
if ok := builtInNumFmtFunc[numFmtID]; ok != nil {
return ok(v, builtInNumFmt[numFmtID], date1904)
}
- if styleSheet == nil || styleSheet.NumFmts == nil {
+ if styleSheet.NumFmts == nil {
return v
}
for _, xlsxFmt := range styleSheet.NumFmts.NumFmt {