【发布时间】:2013-01-24 10:15:55
【问题描述】:
如何使用 xlrd 模块将 Python 日期转换为 Excel 日期? How to convert a python datetime.datetime to excel serial date number 建议使用“手动”解决方案,我想知道这是否是最好的方法。
Xlrd document 建议使用xlrd.xldate_from_date_tuple
但是
>>> 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'
你能帮忙吗?谢谢。
【问题讨论】:
-
我正在寻找 xlrd_as_tuple 的反面。这个就像一个魅力。