Can’t find workbook in ole2 compound document

To find a workbook in an OLE2 Compound Document, you can use various tools and methods available. Here we explain a few methods with examples:

1. Using Python and the olefile module:

import olefile
  
# Open the compound document
ole = olefile.OleFileIO("path/to/document.doc")
  
# Extract all streams from the document
streams = ole.listdir()
  
# Search for the workbook stream
workbook_stream = None
for stream in streams:
    if stream[-1] == "Workbook":
        workbook_stream = stream
        break
  
# If workbook stream found, extract it
if workbook_stream:
    workbook_data = ole.openstream(workbook_stream).read()
    # Do something with the workbook data
  
# Close the compound document
ole.close()

2. Using Microsoft Office applications:

  • Open the compound document in an appropriate Microsoft Office application (e.g., Word, Excel, PowerPoint).
  • If the compound document contains a workbook, it will be opened as a separate file within the application.
  • You can now work with the workbook using the features and functions provided by the application.

3. Using third-party OLE2 Compound Document viewers/editors:

  • There are various third-party software tools available that can open, view, and edit OLE2 Compound Documents.
  • These tools typically provide a user-friendly interface to navigate and explore the contents of the compound document.
  • You can search for specific streams or resources, and extract or edit them as needed.

Read more interesting post

Leave a comment