Search code examples
pythonexcelpywin32win32combloomberg

Bloomberg Excel Add-In Keeps Crashing when I Open xlsx files with Win32


I've done some investigation so I'm making my question a bit more specific:

import win32com.client as win32

excel = win32.gencache.EnsureDispatch('Excel.Application')
wb_AS = openWorkbook(excel, _AccountSummary_)
excel.Visible = True

Once I've opened the file the bloomberg add-in crashes and any formulas that reference that add-in are kicked out. Anyone know why?


Solution

  • So, I have found that by switching excel.Visible to False, it performs all the other functions I want and the Bloomberg Add-in is left in tact.

    Problem is I preferred to have the file pop up and allow for a quick eyeball check before saving since this is being used by a third party, not familiar with Python.