-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two meanings return in NewSheet(name string) int #714
Comments
Thanks for your feedback, as you say the index returned by |
Great, thank you for the quick action! Returning the index is more coherence. Just a kind reminder of updating the comment to reflect the change would be very appreciated. |
I have fixed it, please try to use the master branch code. |
Thank you for the fix. How about the method's comment. The original one is
The last sentence |
I have updated the docs of the |
Thank you for the fix. The comment is now crystal clear. And also with your additional of |
…ex returned by NewSheet in some case, fix panic on formatted value with no built-in number format ID
…ex returned by NewSheet in some case, fix panic on formatted value with no built-in number format ID
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.
https://github.com/360EntSecGroup-Skylar/excelize/blob/520aa679f34bafbc00626151075b0b123eceb516/sheet.go#L36
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
output.
totalSheet
is always one less thanf.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.
The text was updated successfully, but these errors were encountered: