2

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.

Community
  • 1
  • 1
Yulia V
  • 3,507
  • 10
  • 31
  • 64

1 Answers1

3

Use xlrd.xldate.xldate_from_date_tuple

John Machin
  • 81,303
  • 11
  • 141
  • 189