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.26k stars 270 forks source link

Allow use of ExcelReference from outside Excel context #655

Open govert opened 6 months ago

govert commented 6 months ago

From this discussion: https://groups.google.com/g/exceldna/c/1CkGn4zLA18/m/0S9ocPxvAAAJ

For testing purposes, it can be convenient to use the ExcelReference class in a context where the code is not running as an Excel add-in in Excel. This scenario broke in version 1.1 and since has caused a NullReferenceException to be thrown.

There is a workaround for this under .NET Framework, but it might be useful to create some public and supported way to do this more generally.