Skip to content

Commit

Permalink
fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalfree committed Jul 12, 2024
1 parent 79622db commit 24a3049
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/tablib/formats/_ods.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,21 @@ def dset_sheet(cls, dataset, ws):
cell = table.TableCell(valuetype="float", value=col)
elif isinstance(col, dt.datetime):
cell = table.TableCell(
valuetype="date", datevalue=col.strftime('%Y-%m-%dT%H:%M:%S'), stylename=dts
valuetype="date",
datevalue=col.strftime('%Y-%m-%dT%H:%M:%S'),
stylename=dts,
)
cell.addElement(text.P(text=col.strftime('%Y-%m-%d %H:%M:%S')))
elif isinstance(col, dt.date):
date_value = col.strftime('%Y-%m-%d')
cell = table.TableCell(valuetype="date", datevalue=date_value, stylename=ds)
cell.addElement(text.P(text=date_value))
elif isinstance(col, dt.time):
cell = table.TableCell(valuetype="time", timevalue=col.strftime('PT%HH%MM%SS'))
cell = table.TableCell(
valuetype="time",
timevalue=col.strftime('PT%HH%MM%SS'),
stylename=ts,
)
cell.addElement(text.P(text=col.strftime('%H:%M:%S')))
elif col is None:
cell = table.TableCell(valuetype="void")
Expand Down

0 comments on commit 24a3049

Please sign in to comment.