Parsing OOoCalc with Python-SAX

Today I really felt like a developer…. well… almost.. 🙂

I actually went to the site of ActiveState and read a script for parsing the native XML file in MS Excel and modifiying so it will parse data from OOo Calc.

The result was great:

I got the data in both forms doing a simple modifications to the script. I did have to bang my head on a couple of things, one was the indentation and the other was the proper renaming of the tags.

I also could learn the difference between both MS-XML and OASIS XML. I did found that MS as always ignore W3C recomendations about keeping the tags on lowercases and also having a more straight forward xml construction which might be proven limiting on the long road.

I still need to test this solution in case the spreadsheets get complex and include formulas and fields. However so far it was a rewarding excercise and good PyXperience. 🙂