-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I would like to thank to all contributors for creating such a great library. It is tremendous help in my work. I have a minor issue here.
The comment says Returns the number of sheets in the workbook (file) after appending the new sheet. However, the return number has two meanings.
For instance
// f *excelize.File
totolSheet := f.NewSheet("newSheetName")
log.Println("create new sheet: ", totolSheet, f.SheetCount)
output.
totalSheet is always one less than f.SheeetCount if "newSheetName" hasn't existed before (succeed in appending a new sheet).
Both are equal in case of "newSheetName" is already exist.
I faced the problem by reading the comment and wrote my code as
tempIndex := f.NewSheet(tempName) - 1
now, I have to change to
tempIndex := f.NewSheet(tempName)
which isn't quite having the same meaning with the function comment.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working