eea / odfpy

API for OpenDocument in Python
GNU General Public License v2.0
308 stars 63 forks source link

Autoscaling of columns for ods files doesn't work #82

Open genuinelucifer opened 5 years ago

genuinelucifer commented 5 years ago

I am using something along the lines of:

autoscaledcolumn = Style(name="autoscaledcolumn", family="table-column")
autoscaledcolumn.addElement(TableColumnProperties(useoptimalcolumnwidth=True))
textdoc.automaticstyles.addElement(autoscaledcolumn)
sheet = Table(name="Summary")
sheet.addElement(TableColumn(stylename=autoscaledcolumn))
sheet.addElement(TableColumn(stylename=autoscaledcolumn))

But, when I add rows to the table, the columns are not autoscaled.

What am I doing wrong?