summaryrefslogtreecommitdiff
path: root/sheet.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-05-23 13:02:11 +0800
committerGitHub <noreply@github.com>2022-05-23 13:02:11 +0800
commitafb2d27c90130878b82a70b44ccb4e30344cc09e (patch)
treebcab578db24cf82c974fe0d92ac82dfd37f37ffe /sheet.go
parent63adac25897f295ef4493e060d917650f03ebd3b (diff)
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`
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 {