Browse Source

Merge pull request #387 from 24COMS/master

Improved file.AddSheet documentation
Ryan Hollis 7 years ago
parent
commit
1439b536b4
1 changed files with 3 additions and 1 deletions
  1. 3 1
      file.go

+ 3 - 1
file.go

@@ -150,7 +150,9 @@ func (f *File) Write(writer io.Writer) (err error) {
 	return zipWriter.Close()
 	return zipWriter.Close()
 }
 }
 
 
-// Add a new Sheet, with the provided name, to a File
+// Add a new Sheet, with the provided name, to a File. 
+// The maximum sheet name length is 31 characters. If the sheet name length is exceeded an error is thrown.
+// These special characters are also not allowed: : \ / ? * [ ]
 func (f *File) AddSheet(sheetName string) (*Sheet, error) {
 func (f *File) AddSheet(sheetName string) (*Sheet, error) {
 	if _, exists := f.Sheet[sheetName]; exists {
 	if _, exists := f.Sheet[sheetName]; exists {
 		return nil, fmt.Errorf("duplicate sheet name '%s'.", sheetName)
 		return nil, fmt.Errorf("duplicate sheet name '%s'.", sheetName)