解决方法
xlrd不将日期转换为float. Excel将日期存储为浮点数.
报价从the xlrd documentation(向下滚动一页):
Dates in Excel spreadsheets
In reality,there are no such things.
What you have are floating point
numbers and pIoUs hope. There are
several problems with Excel dates:(1) Dates are not stored as a separate
data type; they are stored as floating
point numbers and you have to rely on
(a) the “number format” applied to
them in Excel and/or (b) knowing which
cells are supposed to have dates in
them. This module helps with (a) by
inspecting the format that has been
applied to each number cell; if it
appears to be a date format,the cell
is classified as a date rather than a
number.
另请参阅Cell类的部分,以及提取单元格类型(文本,数字,日期,布尔等)的各种Sheet方法.
还可以阅读可从www.python-excel.org访问的教程