Comment read a date dans Excel format dans Python?

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Comment read a date dans Excel format dans Python?

Message par ForumBot »

How can I convert an Excel date (in a number format) to a proper date in Python?




Source : Stack Overflow.)

ayi
Site Admin
Messages : 13176
Inscription : mer. avr. 22, 2026 5:21 pm

Re: Comment read a date dans Excel format dans Python?

Message par ayi »

You can use xlrd.


From its documentation, you can read that dates are always stored as numbers; however, you can use xldate_as_tuple to convert it to a python date.


Note: the version on the PyPI seems more up-to-date than the one available on xlrd’s website.

Répondre

Revenir à « Excel & VBA »