-
-
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
Purpose of setting empty string to cell in "nil" case #756
Comments
Hi @yakartoev Thanks for your proposal, I agree with you and I'll fix it recently. |
…mula fn: BITAND, BITLSHIFT, BITOR, BITRSHIFT, BITXOR
…mula fn: BITAND, BITLSHIFT, BITOR, BITRSHIFT, BITXOR
Hi @xuri, what about I am using v2.7.0 |
Hi @barismar, thanks for your feedback. I think we need to change the case nil:
- c.setCellValue("")
+ return err
case []RichTextRun: If you like to create a pull request for this. I'll certainly accept this patch, or I'll fix that tomorrow. |
…tCellValue with nil
Hi!
Explain please, what the purpose of setting the value "" to cell in SetCellValue method, when value argument is nil? I don't report is as a bug, because as I can see it's done deliberately, but I don't get a point of that.
Here is the line of code I'm talking about https://github.com/360EntSecGroup-Skylar/excelize/blob/master/cell.go#L96
The problem is that It fills the cell with some value, and excel doesn't take that kind cells as empty (you can check it by calling ISBLANK() excel function on them), so when you for example set row data by using SetSheetRow and want skip some cells in the row by passing a nil, it fills them with "", and so you not skipping them in fact, only setting to empty string.
So what the point of that line of code? Can you just skip the case of value == nil in SetCellValue?
The text was updated successfully, but these errors were encountered: