question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug with Numerical Zero as Cell Value None

See original GitHub issue

I have a basic numbers spreadsheet with a cell value of 0 (cell data format set to Automatic).

2021-12-12 at 10 44 AM

When run through numbers-parser I see…

2021-12-12 10:42:35,792 DEBUG Table 1@[3,3]: value=0.0

But the cell value from iter_rows is None.

If I change the data format to Text, the result is a string “0” (which I expect).

The None result seems like a bug in conditional logic.

(p.s. Thank you so much for this library. I’m finally adding Numbers support to my app 🥳)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
semiregcommented, Dec 12, 2021

Verified working as expected. 👏

1reaction
masacciocommented, Dec 12, 2021

That was enough. values_only=True is at fault. As a quick workaround you can skip the parameter to iter_rows and get the values with cell.value.

It was indeed a logic error (yielding cell.value or None). Will be an easy fix so will publish a new patch version in the next couple of days latest.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A blank cell not registering as zero in excel - Super User
The only solution is to click on the cell then click the input bar and press enter.
Read more >
Links to blank cells are showing zeroes - Microsoft Community
When the cell in the original sheet contains a blank, the linked cell displays a zero. I can't use hide zero values because...
Read more >
95468 – “Empty” cells not treated as zero in formulas but throw ...
Bug 95468 - “Empty” cells not treated as zero in formulas but throw ... Alias: None ... Returns the numeric value of the...
Read more >
How to Fix Excel Numbers That Don't Add Up - Contextures
COUNT: However, the COUNT function in cell F5 show a result of zero. That shows that none of the values in cells C3:C6...
Read more >
How to fill empty cells with 0, with value above/below in Excel
Method 1 · Select the empty cells. · Press F2 to enter a value in the active cell. Press F2 to enter the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found