Excel-DNA / Excel-DNA/ExcelDna

Stuck on "Registering library" when workbook is opened before add-in

Open
#380 9 comments 0 reactions 0 assignees View on GitHub
confirmed-bug
Dominant language
C#
Stars
1.5k
Forks
292
Avg merge
20d 12h
Merged PRs (30d)
1

Description

This is a weird one. We've been using ExcelDna for 5+ years, more or less keeping up to date with the latest version, also more or less keeping up with the latest office 365 has to offer (currently Excel Version 2002)

Lately, we're building workbooks that are using features of Excel we've never used in combination with the add-in before (Format-as-Table tables, new spilling Array Formulas, etc) We've managed to build a workbook that works fine if we open the add-in first, then open the workbook - but if we open the workbook first, opening the add-in hangs on "Registering library" and never completes.

![image](https://user-images.githubusercontent.com/2285037/115887664-8875ca00-a428-11eb-853c-22bbbf2a6c69.png)

With some experimenting, we've determined that the issue "goes away" if we remove all "lookups" (index/match) into a "Format-as-table" table containing a ton of UDFs from the Excel add-in. The more we have, the longer it hangs. At a few thousand rows / few dozen columns of index-lookups into this table full of UDF calls, it hangs indefinitely (hours+).

If the hung thread/process gets 'killed' (by letting windows Restart Excel) the following add-in diagnostic dialog pops up before Excel is restarted:
![image](https://user-images.githubusercontent.com/2285037/115889882-bf4cdf80-a42a-11eb-9c25-0c456b447724.png)
Not sure if it's helpful or points to the point in the registration workflow that things have gotten hung.

I think we've stumbled into a scenario where the cost/time to register the library scales with the number of UDF calls in the currently open workbook, and was wondering where we can go from here to investigate the root cause and eliminate it.

Let me know what you think.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.