-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Printing an empty cell? #118
Comments
Hi @Ethan-Chew, there's a difference here between an empty cell and absence of a cell. If you'd like to know whether a cell contains a shared string value in this worksheet, you'll have to use |
In my case, it is an empty cell, however, after running Compact Map, it returns as nil instead of "". I grabbed the whole row, and there is 1 empty cell, however, for that cell itself, it returns as nil. |
I underestand that, but unfortunately the only way for us to distinguish an empty string in a cell |
Ah.. Ok. I have found a temporary solution for anyone who reads this.. Just replace all empty cells with some string like "Empty Cell" |
Is there a way to print an empty cell? After doing,
let test = worksheet.cells(atRows: [2]) .compactMap { $0.stringValue(sharedStrings) }
Empty cells don't return as "" but as nil, also removing it as Compact Map was used.
Thanks for the help
The text was updated successfully, but these errors were encountered: