Python: Import Data from Open Office calc with lxml
-
23-09-2019 - |
Question
How can I import data for example for the field A1? When I use etree.parse() I get an error, because I dont have a xml file.
Solution
It's a zip file:
import zipfile
from lxml import etree
z = zipfile.ZipFile('mydocument.ods')
data = z.read('content.xml')
data = etree.XML(data)
etree.dump(data)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow