diff options
author | xuri <xuri.me@gmail.com> | 2018-09-27 23:40:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-27 23:40:33 +0800 |
commit | f0234e6c08f77d23499945e2720a900306a12e95 (patch) | |
tree | 0b9a795ea20804753134fd54c40d17c5a01c64f6 /sheet.go | |
parent | 3e004d900b103379c2d62657a3070de4a2e8585a (diff) | |
parent | 204139739a34aa6e6c5ea8764008276a6d184ff6 (diff) |
Merge pull request #233 from sewi-cpan/master
Update documentation and add sample file
Diffstat (limited to 'sheet.go')
-rw-r--r-- | sheet.go | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -24,9 +24,9 @@ import ( "github.com/mohae/deepcopy" ) -// NewSheet provides a function to create a new sheet by given worksheet name, -// when creating a new XLSX file, the default sheet will be create, when you -// create a new file. +// NewSheet provides function to create a new sheet by given worksheet name. +// When creating a new XLSX file, the default sheet will be created. Returns +// the number of sheets in the workbook (file) after appending the new sheet. func (f *File) NewSheet(name string) int { // Check if the worksheet already exists if f.GetSheetIndex(name) != 0 { @@ -221,9 +221,9 @@ func replaceRelationshipsNameSpaceBytes(workbookMarshal []byte) []byte { return bytes.Replace(workbookMarshal, oldXmlns, newXmlns, -1) } -// SetActiveSheet provides a function to set default active worksheet of XLSX by -// given index. Note that active index is different with the index that got by -// function GetSheetMap, and it should be greater than 0 and less than total +// SetActiveSheet provides function to set default active worksheet of XLSX by +// given index. Note that active index is different from the index returned by +// function GetSheetMap(). It should be greater than 0 and less than total // worksheet numbers. func (f *File) SetActiveSheet(index int) { if index < 1 { @@ -257,8 +257,8 @@ func (f *File) SetActiveSheet(index int) { } } -// GetActiveSheetIndex provides a function to get active sheet of XLSX. If not -// found the active sheet will be return integer 0. +// GetActiveSheetIndex provides a function to get active sheet index of the +// XLSX. If not found the active sheet will be return integer 0. func (f *File) GetActiveSheetIndex() int { buffer := bytes.Buffer{} content := f.workbookReader() |