Excel-DNA / ExcelDna

Excel-DNA - Free and easy .NET for Excel. This repository contains the core Excel-DNA library.
https://excel-dna.net
zlib License
1.28k stars 274 forks source link

First book created is called Book2 when ribbon add-in installed #272

Open govert opened 4 years ago

govert commented 4 years ago

When an Excel-DNA add-in with a ribbon is installed into Excel, it creates (and then closes) a hidden workbook during loading in an attempt to get hold of the Application COM object. A side-effect of this is that the first book created is called "Book2" which is often a sign to the user that "something is wrong". It would be good to either find a mechanism that gets hold of the Application object without this side effect, or implement some kind of delay loading that gives Excel a chance to create the Application object itself before the add-in is loaded.

/cc @augustoproiete This is a tricky one, but related to where you have been looking.

govert commented 4 years ago

Revisit this issue in the light of this discussion: https://groups.google.com/g/exceldna/c/u4kmDlLn614