In the xlrd xldate.py module there are several functions, xldate_from_date_tuple()
, xldate_from_time_tuple()
and xldate_from_datetime_tuple()
, which convert datetime objects to Excel series dates.
Also, in the XlsxWriter utility.py module there is a function called datetime_to_excel_datetime()
which converts datetime objects for an Excel serial date.
All of these solutions take into account the epoch and the Excel 1900 leapyear bug.