Browse Source

Added column width as a constant.

Artem Chernyak 11 years ago
parent
commit
0bd448eea1
1 changed files with 4 additions and 1 deletions
  1. 4 1
      sheet.go

+ 4 - 1
sheet.go

@@ -5,6 +5,9 @@ import (
 	"strconv"
 	"strconv"
 )
 )
 
 
+// Default column width in excel
+const colWidth = 9.5
+
 // Sheet is a high level structure intended to provide user access to
 // Sheet is a high level structure intended to provide user access to
 // the contents of a particular sheet within an XLSX file.
 // the contents of a particular sheet within an XLSX file.
 type Sheet struct {
 type Sheet struct {
@@ -81,7 +84,7 @@ func (s *Sheet) makeXLSXSheet(refTable *RefTable) *xlsxWorksheet {
 			xlsxCol{Min: col.Min,
 			xlsxCol{Min: col.Min,
 				Max:    col.Max,
 				Max:    col.Max,
 				Hidden: col.Hidden,
 				Hidden: col.Hidden,
-				Width:  9.5})
+				Width:  colWidth})
 	}
 	}
 	worksheet.SheetData = xSheet
 	worksheet.SheetData = xSheet
 	dimension := xlsxDimension{}
 	dimension := xlsxDimension{}