Skip to content

Timedelta and iso_dates

nmartensen requested to merge topic/3.0/iso_delta into branch/3.0

When iso_dates is set to True, openpyxl does not really know what to do with timedeltas since the XLSX specification does not provide a suitable string representation for them. It currently divides the duration by full days, discards the integer ratio and converts the fractional day remainder to time of day. This makes it impossible to roundtrip timedelta values through files using iso_dates=True, in particular timedeltas of more than 24 hours.

Instead of doing the lossy conversion from timedelta to time, perhaps we can ignore the iso_dates property when storing timedelta.

Merge request reports