Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

Commented Unassigned: NullReferenceException on ExcelApi.Application.GetActiveInstances() [22037]

$
0
0
Hi,

calling
```
ExcelApi.Application.GetActiveInstances()
```
with an open Excel instance which has no workbooks visibly opened (i.e. start excel and close or hide the default workbook) causes a NullReferenceException.


I tracked it down to the excel hot fix in GetActiveProxiesFromROT and the subsequent proxy lookup by hWnd.
If no workbook is visible there seems to be no EXCEL7 window and the lookup returns a null reference, which then causes the NullReferenceException on COMObject instantiation.

Best regards,
Andreas
Comments: ** Comment from web user: SebastianDotNet **

BTW: do you have a stack trace, exception details(error code line number, etc.) for me?
Its more safe to pin point the (real)problem once and for all.

*Sebastian


Viewing all articles
Browse latest Browse all 1741

Trending Articles