Browse Source

Fix SheetView Pane

Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
Francis Bouvier 9 years ago
parent
commit
6362f23822
2 changed files with 14 additions and 1 deletions
  1. 13 0
      sheet.go
  2. 1 1
      xmlWorksheet.go

+ 13 - 0
sheet.go

@@ -187,6 +187,19 @@ func (s *Sheet) makeXLSXSheet(refTable *RefTable, styles *xlsxStyleSheet) *xlsxW
 	// phantom cells underlying the area covered by the merged cell
 	s.handleMerged()
 
+	for index, sheetView := range s.SheetViews {
+		if sheetView.Pane != nil {
+			worksheet.SheetViews.SheetView[index].Pane = &xlsxPane{
+				XSplit:      sheetView.Pane.XSplit,
+				YSplit:      sheetView.Pane.YSplit,
+				TopLeftCell: sheetView.Pane.TopLeftCell,
+				ActivePane:  sheetView.Pane.ActivePane,
+				State:       sheetView.Pane.State,
+			}
+
+		}
+	}
+
 	if s.Selected {
 		worksheet.SheetViews.SheetView[0].TabSelected = true
 	}

+ 1 - 1
xmlWorksheet.go

@@ -138,8 +138,8 @@ type xlsxSheetView struct {
 	ZoomScaleNormal         float64         `xml:"zoomScaleNormal,attr"`
 	ZoomScalePageLayoutView float64         `xml:"zoomScalePageLayoutView,attr"`
 	WorkbookViewId          int             `xml:"workbookViewId,attr"`
-	Selection               []xlsxSelection `xml:"selection"`
 	Pane                    *xlsxPane       `xml:"pane"`
+	Selection               []xlsxSelection `xml:"selection"`
 }
 
 // xlsxSelection directly maps the selection element in the namespace