PDA

View Full Version : Class to read from .ods OpenOffice Calc spreadsheet format ? Does it exist?



BillGates
12th May 2010, 16:24
Hi !

Is there an example somewhere as how to read from Open Office Calc .ods format ? Basically it is an zipped xml.
It would be nice if anyone has already implemented this using Qt. This seems too useful for it to not have been already done by someone skilled.

tbscope
12th May 2010, 18:12
Besides the current xml classes in Qt, what do you expect from an odf reader?

vcp
12th May 2010, 21:37
Hi,

No, no exists in Qt. You will have to create your own class to do this.
The basic (very basic) steps to do this can be:

1) unzip the files. Ods. Use unzip or Quazip for example our create you own unzip classe.
2) Using the Class QXml (...) you should read and interpret the correct files. It then use the data in your program.

If you do not know what it meant the tags inside the xml files that are encapsulated in the file ods. You can download this file to look at ODF - OpenDocument-v1.0-os.pdf
from ww.osasis-open.org

squidge
12th May 2010, 23:42
Since Open Office is Open source, you may find that there is a class already written for you. It may not be Qt based (never looked at it), but it could still be very useful.

Unless of course your license would conflict with the one from Open office, in which case you could only use it as a reference.