From afb2d27c90130878b82a70b44ccb4e30344cc09e Mon Sep 17 00:00:00 2001 From: xuri Date: Mon, 23 May 2022 13:02:11 +0800 Subject: This fix formula calculation accuracy issue and panic when set pane - Fix `GROWTH` and `TREND` calculation accuracy issue - Fix panic when add pane on empty sheet views worksheet - New exported constants `MinFontSize` --- sheet.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sheet.go') 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 { -- cgit v1.2.1