Regression: v2.2.1 returns date field as an integer but used to be datetime field in any previous versions

Issue #447 resolved
C. W.
created an issue

Hi

Please refer to the attached spread sheet. via openpyxl, cell('A2') used to return ‘2014-12-25 00:00:00’ but v2.2.1 returns 41998.

Please have a look.

Cheers

Comments (6)

  1. Charlie Clark

    The custom number formats are not parsing as relating to datetime values. Unfortunately, Excel treats datetimes as numbers unless the formatting is right and we use the same logic in openpyxl. I don't know what created the file but saving it Excel resolves the problem.

  2. Charlie Clark

    It looks like the uppercasing in the format is what's tripping the detection up. This is easy enough to fix but I wonder the formats should also be normalised to lower case as Excel seems to do.

  3. Log in to comment