We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 26b665c + 473ee14 commit 23fc6a5Copy full SHA for 23fc6a5
pyexcel_xls/xlsw.py
@@ -52,6 +52,14 @@ def write_row(self, array):
52
value = xlrd.xldate.xldate_from_datetime_tuple(tmp_array, 0)
53
style = XFStyle()
54
style.num_format_str = DEFAULT_DATETIME_FORMAT
55
+ elif isinstance(value, datetime.timedelta):
56
+ hours = value.days * 24 + value.seconds // 3600
57
+ minutes = (value.seconds // 60) % 60
58
+ seconds = value.seconds % 60
59
+ tmp_array = [hours, minutes, seconds]
60
+ value = xlrd.xldate.xldate_from_time_tuple(tmp_array)
61
+ style = XFStyle()
62
+ style.num_format_str = DEFAULT_TIME_FORMAT
63
elif isinstance(value, datetime.date):
64
tmp_array = [value.year, value.month, value.day]
65
value = xlrd.xldate.xldate_from_date_tuple(tmp_array, 0)
0 commit comments