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.
+1
A:
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)
MattH
2010-03-01 15:04:43
http://paste.pocoo.org/show/184294/ I get an error
kame
2010-03-01 15:11:31
What I've posted works for me with a OpenOffice spreadsheet saved as "mydocument.ods" in the working directory.`etree.dump` just prints a pretty version of the xml to stdout, are you running this with stdout nobbled? I've just got it there to show you that that is the parsed document containing the structure where the value of `A1` is stored.
MattH
2010-03-01 15:36:45
I dont know stdout :/
kame
2010-03-01 16:06:45
`stdout` - `Standard Output` is where a program writes its output to. http://en.wikipedia.org/wiki/Standard_streams The error message you posted isn't enough for me to be sure what's going on, but it seems clear you're not running the example I've posted.
MattH
2010-03-01 16:17:57