diff --git a/src/tablib/formats/_ods.py b/src/tablib/formats/_ods.py index f9321286..adab7e18 100644 --- a/src/tablib/formats/_ods.py +++ b/src/tablib/formats/_ods.py @@ -214,7 +214,9 @@ 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): @@ -222,7 +224,11 @@ def dset_sheet(cls, dataset, ws): 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")