summaryrefslogtreecommitdiff
path: root/sheet.go
diff options
context:
space:
mode:
Diffstat (limited to 'sheet.go')
-rw-r--r--sheet.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/sheet.go b/sheet.go
index 4665fd9..1c17f78 100644
--- a/sheet.go
+++ b/sheet.go
@@ -773,6 +773,9 @@ func (f *File) SetPanes(sheet, panes string) error {
if fs.Freeze {
p.State = "frozen"
}
+ if ws.SheetViews == nil {
+ ws.SheetViews = &xlsxSheetViews{SheetView: []xlsxSheetView{{}}}
+ }
ws.SheetViews.SheetView[len(ws.SheetViews.SheetView)-1].Pane = p
if !(fs.Freeze) && !(fs.Split) {
if len(ws.SheetViews.SheetView) > 0 {