OLE Compound Documents in Python

How will you parse a Microsoft OLE composite document using Python?

Edit: Sorry, I forgot to say that I also need write support. In short, I have an OLE compound file that I need to read, change a bit, and write back to disk (this is a file made using a CAD application)

+3
source share
3 answers

Just found OleFileIO_PL , but it has no write support ..: /

Edit: There seems to be a way (albeit for Windows) that also supports recording. pywin32 extensions ( StgOpenStorage function and related)

+3
source

Alternative: xlrd package has a reader. The xlwt package (pyExcelerator plug) has the author. They do a great job with files from the 100s MB; Packages have been widely used for 4 years. Modules of compound documents are aimed at receiving flows of "Workbook" in Excel.xls files and from them as efficiently as possible, but quite universal. Unlike OleFileIO_PL, they do not provide access to the internal properties of the Property streams.

http://pypi.python.org/pypi/xlrd
http://pypi.python.org/pypi/xlwt 

If you decide to use them and need help, ask in this forum:

http://groups.google.com/group/python-excel

+2
source

: Linux GNOME Structured File Library ( Debian/Ubuntu Python, Python 2006 ) POIFS Java.

0
source

Source: https://habr.com/ru/post/1710673/


All Articles