Excel-DNA / Excel-DNA/ExcelDna
Issue when opening a new workbook during a function call
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 292
- Avg merge
- 20d 12h
- Merged PRs (30d)
- 1
Description
Steps to reproduce:
1. =Test(TODAY())
2. Click Enter
3. Within the 1 second wait, click Ctrl + N to launch a new workbook
The results will not be returned. Furthermore, any calls on new workbooks to '=Test(TODAY())' will immediately return 'Hello' (ie: not recalling the function, simply returning the cached result)
`
using ExcelDna.Integration;
using ExcelDna.Registration;
namespace DNABug
{
public class Class1
{
public partial class Registration : IExcelAddIn
{
public void AutoOpen() => ExcelRegistration.GetExcelFunctions().ProcessAsyncRegistrations().RegisterFunctions();
public void AutoClose() { }
[ExcelFunction(Name = "Test")]
public static async Task Tester([ExcelArgument(Name = "p1")] object p1)
{
await Task.Delay(1000);
return "Hello";
}
}
}
}
`
Contributor guide
Assessment
This issue has not been assessed yet.