Paragraph style on two columns in ODT file with odfpy

26 Views Asked by At

I was searching a way to generate odf files with the whole text into two columns (not a table, but columns like in Format > Columns).

In some way, i come up with this valid solution (aka, that don't crash) with odfpy lib:

from odf.text import P
from odf.style import Style, Columns

paragraph_style = Style(name="Paragraph", family="paragraph")
paragraph_style.addElement(Columns(attributes={"columncount": 2}))
paragraph = P(stylename=paragraph_style)

But i does nothing at all: text is in one column. Is there a proper way to do that ?

0

There are 0 best solutions below