Yulia V
Yulia V

Reputation: 3559

How to convert from Python date to Excel date using xlrd (attribute xlrd.xldate_from_date_tuple does not exist)

How to convert from Python date to Excel date using xlrd module? How to convert a python datetime.datetime to excel serial date number suggests a 'manual' solution, I wonder if it is the best way.

Xlrd document suggests to use xlrd.xldate_from_date_tuple

but

>>> import xlrd
>>> xlrd.xldate_from_date_tuple
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'xldate_from_date_tuple'

Could you help? Thanks.

Upvotes: 2

Views: 1589

Answers (1)

John Machin
John Machin

Reputation: 83032

Use xlrd.xldate.xldate_from_date_tuple

Upvotes: 3

Related Questions