Cell class constants conflict (TYPE_NULL and TYPE_NUMERIC are both 'n')

Issue #513 invalid
Nathan McCorkle created an issue

I was trying to determine the cell type, but my code could not distinguish how openpyxl was casting them because the Cell data_type is ambiguous for null vs number.

When I changed TYPE_NULL to None, instead of 'n'... my code started working, and I didn't seem to break anything, but I'm not sure

Comments (2)

  1. CharlieC

    The default type for a cell is 'n' whether it has a value or not. The Cell class constants are irrelevant for client code. We probably shouldn't be using them at all but they're a relic of the early work.

  2. Log in to comment