I tried to read ".odt" files using python with "odfpy" library, but it still doesn't work.
How can I read an ".odt" file using Python?
I tried to read ".odt" files using python with "odfpy" library, but it still doesn't work.
How can I read an ".odt" file using Python?
First install odfpy library then,
In [21]: from odf import text, teletype...: from odf.opendocument import load...: ...: textdoc = load("your.odt")...: allparas = textdoc.getElementsByType(text.P)...: teletype.extractText(allparas[0])...:
Out[21]: 'Hello World!'