Skip to content

Commit

Permalink
Fix SetPanes
Browse files Browse the repository at this point in the history
  • Loading branch information
dude333 committed Oct 3, 2023
1 parent 8ed372c commit 8efab7d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/excel/excel.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,15 @@ func (x *Excel) SetColWidth(widths []float64) {
}

func (x *Excel) FreezePane(cell string) error {
row, col, err := excelize.CellNameToCoordinates(cell)
if err != nil {
return err
}
return x.file.SetPanes(x.sheetName, &excelize.Panes{
Freeze: true,
Split: false,
XSplit: 2,
YSplit: 1,
XSplit: row - 1,
YSplit: col - 1,
TopLeftCell: cell,
ActivePane: "bottomRight",
Panes: []excelize.PaneOptions{
Expand Down

0 comments on commit 8efab7d

Please sign in to comment.