Closed lucatrv closed 1 year ago
So IMHO I should be able to write dates to that column with:
You are correct. You should be able to do that.
I implemented write_datetime()
as write_datetime_with_format()
since it almost never makes sense in Excel to write a date without a format. However, that creates an inconsistency for the case you pointed out so I will need to fix it. It is also inconsistent with the other language versions of the library.
Thanks for the input.
This is now fixed on main and will be in the next release.
The write_datetime()
method no longer takes a format (that becomes write_datetime_with_format()
) and the write()
method no longer add a default date/time format.
The datetime will pick up any implicit column or row formatting or display as an unformatted number.
This is fixed in version v0.42.0. Thanks for the report.
Feature Request
I set a column format with
So IMHO I should be able to write dates to that column with:
instead of having to repeat the same format with:
In other words, the plain
write_datetime
method should not receive a format, while a separatewrite_datetime_with_format
method should be added for those cases where the date format has not already been applied to the cell.