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.

Was it helpful?

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
scroll top