We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dear ExcelDNA team,
Excel add-in is creating and ExcelDNA is being used. In custom function, I am trying to get name of calling file.
The code works, but it takes a long time to execute.
Code:
public string Method() { var reference = (ExcelReference) XlCall.Excel(XlCall.xlfCaller); var sheetName = (string) XlCall.Excel(XlCall.xlSheetNm, reference); var path1 = XlCall.Excel(XlCall.xlfGetDocument, 2, sheetName); var path2 = XlCall.Excel(XlCall.xlfGetDocument, 88, sheetName); if (path1 is string && path2 is string) { var pStr1 = path1.ToString(); var pStr2 = MethodUsingApplication(path2.ToString()); // ... } // ... } private string MethodUsingApplication(string raw) { try { var fullName = _app?.Workbooks[raw]?.FullName; return Path.GetFileName(fullName); } catch (Exception ex) { // ... return raw; } }
Questions:
Versions: Excel: 2311 (Build 17029.20108) ExcelDNA: 1.6.0 .NET: .NET Framework 4.8
Thanks in advance
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Dear ExcelDNA team,
Excel add-in is creating and ExcelDNA is being used.
In custom function, I am trying to get name of calling file.
The code works, but it takes a long time to execute.
Code:
Questions:
Versions:
Excel: 2311 (Build 17029.20108)
ExcelDNA: 1.6.0
.NET: .NET Framework 4.8
Thanks in advance
The text was updated successfully, but these errors were encountered: