Description:
MySQL for Excel always creates a new workbook on startup, which it must not do when Excel is started as a background service, or when Excel is used to load a document into an OLE container.
This also breaks compatibility with other Add-ins using Excel as a background service, such as the think-cell Add-in.
I saw that similar bugs have been reported before by other users (e.g., #86633), which may be related.
How to repeat:
Microsoft Excel 2016 MSO (16.0.9216.2116) 32-bit, MySQL for Excel 1.3.7
Reproduction 1: Start Excel with /Embedding command line switch.
Expected behavior: Excel will start in the background, without visible window, and the Application.Workbooks collection is empty.
Actual behavior (with MySQL for Excel): An Excel workbook window will pop up.
Reproduction 2: In a PowerPoint presentation, go to insert > object > Microsoft Excel Worksheet.
Expected behavior: Just the embedded worksheet opens inside the PowerPoint's container.
Actual behavior (with MySQL for Excel): an additional, empty worksheet opens in a separate Excel window.
Suggested fix:
I am refering to the source code for 1.3.7. Inside method ThisAddIn_Startup, change the line
InitializeWorkbook(ActiveWorkbook);
to
InitializeWorkbook(Application.ActiveWorkbook);
Note that InitializeWorkbook is robust against workbook argument being null.