Browse Source

Enable modification of sheet DefaultRowHeight and DefaultColWidth

Mathias Fredriksson 10 years ago
parent
commit
41b5c21bfb
1 changed files with 5 additions and 0 deletions
  1. 5 0
      sheet.go

+ 5 - 0
sheet.go

@@ -110,6 +110,11 @@ func (s *Sheet) makeXLSXSheet(refTable *RefTable, styles *xlsxStyleSheet) *xlsxW
 	maxRow := 0
 	maxCell := 0
 
+	if s.SheetFormat.DefaultRowHeight != 0 {
+		worksheet.SheetFormatPr.DefaultRowHeight = s.SheetFormat.DefaultRowHeight
+	}
+	worksheet.SheetFormatPr.DefaultColWidth = s.SheetFormat.DefaultColWidth
+
 	colsXfIdList := make([]int, len(s.Cols))
 	worksheet.Cols = xlsxCols{Col: []xlsxCol{}}
 	for c, col := range s.Cols {