This closes #1298, fix doc properties missing after creating new worksheet
This commit is contained in:
parent
fd0eb2bcbf
commit
504d469d3d
7
sheet.go
7
sheet.go
|
@ -53,8 +53,6 @@ func (f *File) NewSheet(sheet string) int {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sheetID++
|
sheetID++
|
||||||
// Update docProps/app.xml
|
|
||||||
f.setAppXML()
|
|
||||||
// Update [Content_Types].xml
|
// Update [Content_Types].xml
|
||||||
f.setContentTypes("/xl/worksheets/sheet"+strconv.Itoa(sheetID)+".xml", ContentTypeSpreadSheetMLWorksheet)
|
f.setContentTypes("/xl/worksheets/sheet"+strconv.Itoa(sheetID)+".xml", ContentTypeSpreadSheetMLWorksheet)
|
||||||
// Create new sheet /xl/worksheets/sheet%d.xml
|
// Create new sheet /xl/worksheets/sheet%d.xml
|
||||||
|
@ -239,11 +237,6 @@ func (f *File) relsWriter() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// setAppXML update docProps/app.xml file of XML.
|
|
||||||
func (f *File) setAppXML() {
|
|
||||||
f.saveFileList(defaultXMLPathDocPropsApp, []byte(templateDocpropsApp))
|
|
||||||
}
|
|
||||||
|
|
||||||
// replaceRelationshipsBytes; Some tools that read spreadsheet files have very
|
// replaceRelationshipsBytes; Some tools that read spreadsheet files have very
|
||||||
// strict requirements about the structure of the input XML. This function is
|
// strict requirements about the structure of the input XML. This function is
|
||||||
// a horrible hack to fix that after the XML marshalling is completed.
|
// a horrible hack to fix that after the XML marshalling is completed.
|
||||||
|
|
Loading…
Reference in New Issue