@@ -24,7 +24,7 @@ func (f *File) NewSheet(index int, name string) {
2424 f .setWorkbook (index , name )
2525}
2626
27- // Read and update property of contents type of XLSX
27+ // Read and update property of contents type of XLSX.
2828func (f * File ) setContentTypes (index int ) {
2929 var content xlsxTypes
3030 xml .Unmarshal ([]byte (f .readXML (`[Content_Types].xml` )), & content )
@@ -39,7 +39,7 @@ func (f *File) setContentTypes(index int) {
3939 f .saveFileList (`[Content_Types].xml` , string (output ))
4040}
4141
42- // Update sheet property by given index
42+ // Update sheet property by given index.
4343func (f * File ) setSheet (index int ) {
4444 var xlsx xlsxWorksheet
4545 xlsx .Dimension .Ref = "A1"
@@ -54,7 +54,7 @@ func (f *File) setSheet(index int) {
5454 f .saveFileList (path , replaceRelationshipsID (replaceWorkSheetsRelationshipsNameSpace (string (output ))))
5555}
5656
57- // Update workbook property of XLSX
57+ // Update workbook property of XLSX.
5858func (f * File ) setWorkbook (index int , name string ) {
5959 var content xlsxWorkbook
6060 xml .Unmarshal ([]byte (f .readXML (`xl/workbook.xml` )), & content )
@@ -73,14 +73,14 @@ func (f *File) setWorkbook(index int, name string) {
7373 f .saveFileList (`xl/workbook.xml` , replaceRelationshipsNameSpace (string (output )))
7474}
7575
76- // Read and unmarshal workbook relationships of XLSX
76+ // Read and unmarshal workbook relationships of XLSX.
7777func (f * File ) readXlsxWorkbookRels () xlsxWorkbookRels {
7878 var content xlsxWorkbookRels
7979 xml .Unmarshal ([]byte (f .readXML (`xl/_rels/workbook.xml.rels` )), & content )
8080 return content
8181}
8282
83- // Update workbook relationships property of XLSX
83+ // Update workbook relationships property of XLSX.
8484func (f * File ) addXlsxWorkbookRels (sheet int ) {
8585 content := f .readXlsxWorkbookRels ()
8686 rID := len (content .Relationships ) + 1
@@ -103,7 +103,7 @@ func (f *File) addXlsxWorkbookRels(sheet int) {
103103 f .saveFileList (`xl/_rels/workbook.xml.rels` , string (output ))
104104}
105105
106- // Update docProps/app.xml file of XML
106+ // Update docProps/app.xml file of XML.
107107func (f * File ) setAppXML () {
108108 f .saveFileList (`docProps/app.xml` , templateDocpropsApp )
109109}
@@ -132,7 +132,7 @@ func replaceRelationshipsID(workbookMarshal string) string {
132132 return strings .Replace (rids , `<drawing rid="` , `<drawing r:id="` , - 1 )
133133}
134134
135- // SetActiveSheet provide function to set default active sheet of XLSX by given index
135+ // SetActiveSheet provide function to set default active sheet of XLSX by given index.
136136func (f * File ) SetActiveSheet (index int ) {
137137 var content xlsxWorkbook
138138 if index < 1 {
@@ -185,7 +185,7 @@ func (f *File) SetActiveSheet(index int) {
185185 return
186186}
187187
188- // Replace xl/workbook.xml XML tags to self-closing for compatible Office Excel 2007
188+ // Replace xl/workbook.xml XML tags to self-closing for compatible Office Excel 2007.
189189func workBookCompatibility (workbookMarshal string ) string {
190190 workbookMarshal = strings .Replace (workbookMarshal , `xmlns:relationships="http://schemas.openxmlformats.org/officeDocument/2006/relationships" relationships:id="` , `r:id="` , - 1 )
191191 workbookMarshal = strings .Replace (workbookMarshal , `></sheet>` , ` />` , - 1 )
0 commit comments