OLE/COM Interface

OLE

OLE (formerly Object Linking and Embedding) allows you to interact with Microsoft Office products. See Microsoft OLE Background for more details. It appears OLE is built upon COM (Component Object Model).

Performance BOLOs

  • excel_client.excel.activewindow.selectedsheets.hpagebreaks is expensive. If you add pages using add(), get a handle on it like pb « excel.activewindow.selectedsheets.hpagebreaks and then call pb.add(). You will be amazed on the difference!

Helpful Error Resolutions

**** Error: Automation Server error bad_usage for method screenupdating<<. Server error: 0x80020009 - Exception occurred. Microsoft Excel(0x800A03EC): Unable to set the ScreenUpdating property of the Application class
     ole_server_error(message="screenupdating<<", code=:bad_usage, ole_error="0x80020009 - Exception occurred.", ole_reason="Microsoft Excel(0x800A03EC): Unable to set the ScreenUpdating property of the Application class")
  • The above error occurred in "some" tools that communicated with Excel. Other tools would work without any problem.
    • A Solution was to reboot/re-login. Without starting anything see if there is an Excel executable running in the task manager. If there is kill it, and then you should be good to go. It appears that there was a hung Excel when user exited Windows. When the user re-logged in, Excel was appearing to recover a crashed file or something. With this rogue Excel removed, OLE started working again.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License