400
questions
0
votes
0
answers
18
views
Referencing Custom Tab created using ExcelDna.AddIn in manifest.xml office js add on
If I've created a custom tab using ExcelDna.AddIn, CustomRibbon.xml, how do I deploy an officejs add on, using manifest.xml, so that officejs addon is placed inside that custom tab created from ...
0
votes
1
answer
62
views
How do binding redirects currently work for ExcelDNA plugins?
I am currently stuck in dependency hell with an Excel DNA plugin that uses the Azure SDK to talk to a blob store.
I am encountering the issue outlined here https://github.com/Azure/azure-sdk-for-net/...
0
votes
0
answers
32
views
How to use the intelmkl.redist.win Nuget package in an .NET 6 project with Excel.DNA?
I am working on a .NET 6 project and using Excel-DNA (version 1.8.0). I want to integrate some functionality from Intel MKL. Intel provides a NuGet package for redistributing the native libraries, ...
0
votes
0
answers
33
views
Excel C API (via ExcelDNA) and Named Range Scopes
If I have workbook with ranges:
Inputs = Sheet1!A1:A10, Scope: Workbook
Sheet1!Inputs = Sheet1!B1:B10, Scope: Worksheet/Sheet1
If I activate Sheet1, the following results occur:
XlCall.Excel( XlCall....
0
votes
0
answers
10
views
Create Defined Names from one workbook into another
I am trying to copy defined names from one workbook to another, but i am running into problems with formula and strings.
This is my code (a bit simplified):
public void onButtonPressed(IRibbonControl ...
0
votes
1
answer
55
views
Error with ExcelDna - File does not exist (Xll32FilePath): ExcelDna.xll
I've successfully used ExcelDna in the past (when one had to manually amend the .dna file and copy the XLLs), but I cannot get the ExcelDna.Addin (downloaded via Nuget) working.
I followed the ...
0
votes
0
answers
80
views
Excel-DNA function - Turn off default trigger by VBA Application.Calculate
I have a Excel-DNA function which feeds into a range of cells on the worksheet. The function is triggered everytime I call Application.Calculate in the VBA code but I only want it triggered by ...
0
votes
1
answer
201
views
How do I insert a custom image into a Ribbon using Excel DNA in C#?
I am using Visual Studio Pro 2022 and Excel DNA v1.7.0 to build an XLL in C#, with a series of custom Ribbon buttons.
I have currently got all of the Ribbon XML inserted as a string, returned as part ...
0
votes
1
answer
84
views
Why is ExcelDNA registering some functions as UDFs that I have not asked it to?
I have an ExcelDNA-based add-in (XLL) written in C# that does a bunch of different things, including register some UDFs with Excel for use in cell formulae.
The weird thing is that I have the ...
0
votes
1
answer
128
views
How do I ensure cleanup of a BackgroundWorker thread in C#?
I have an Excel XLL addin built in C# (using ExcelDNA) and one of the tasks it does (upon the user clicking a button) is a call to an external DLL that does a database request that can take a few ...
0
votes
2
answers
227
views
In a C# XLL (Excel add-in using ExcelDNA), how do I detect when a Workbook is closing?
I have an XLL built using ExcelDNA in C#, that contains some UDFs for calculations to use in plain XLSX workbooks.
There are some actions I want the add-in to perform on the BeforeClose event in the ...
0
votes
0
answers
42
views
Is that any way to make excel only calculate partial worksheets?
I make a UDF in C# (by using Excel-DNA nuget package, version:1.7.0-rc9) to get some data from my service api and re-write the data to another worksheet, To ensure that the data is up to date and easy ...
0
votes
0
answers
36
views
Excel-Dna Build is Cutting in Front of Pre-Build Event
We have a .NET 6 UDF project that has a Pre-Build event script (written in PowerShell) specified in the project's build properties. The script generates a .dna file whose content varies based on ...
0
votes
0
answers
46
views
Copy cell style to other cell with Excel-DNA and C#
I'm trying to copy a cell's style to another cell using Excel-DNA library and the copy process will be made through a button from ribbon.
I defined a public class RibbonController : ExcelRibbon with:
...
0
votes
0
answers
39
views
Why does Excel-DNA's CreateExcelAddIn function not find TlbExp.exe when SDK-style project property settings are used to create a ComServer?
I get the following error - when I use the SDK-style project property settings to configure a ComServer project.
1>MSBUILD : ExcelDnaBuild error DNA126955310: The system cannot find the file ...
0
votes
0
answers
20
views
Array Formula (i.e., CSE) UDFs Called Twice
We've noticed that when the user enters an array formula (the legacy CSE formulas) for a UDF, the UDF is called twice. This does not happen with dynamic arrays (Excel 365+). This "double call&...
1
vote
1
answer
85
views
Does Excel-DNA support thread-safe RTD wrapper functions?
This article is talking in the last paragraph of improvements in thread safe RTD Excel functionality in 2020:
https://github.com/Excel-DNA/Tutorials/tree/master/SpecialTopics/RTD
It concludes: "...
0
votes
1
answer
52
views
How to serialise access to a single device from multiple async tasks?
I have single external resource - named pipe. I need to be able to do the following:
multiple async tasks can be spawn nearly simultaneously (by EXCEL-DNA function, ran in many cells)
tasks will try ...
0
votes
0
answers
93
views
ExcelDNA AppDomain could not be created
When launching the .xll file for a minimal ExcelDNA add-in targeting .NET Framework 4.8, certain users see the following error:
A problem occurred while the add-in was creating an isolated ...
0
votes
1
answer
30
views
Not generating a <ProjectName>-Addin.dna file
I want to use open-source excel-dna.addin package
But on very start, I noticed that my file -Addin.dna is not created, because Im using .net6-windows TargetFramework
It works fine when Im using .net ...
0
votes
1
answer
279
views
How can we utilize ExcelFunction and ExcelArgument attributes when dynamically compiling a Excel user-defined function with ExcelDNA?
I have recently worked with ExcelDNA for some sample projects to learn more about the technology. One of the features I am looking to implement is for users to create their own functions in C#, VB, ...
0
votes
1
answer
274
views
Excel-DNA Config Settings on .NET 6
We are transitioning from using Excel-DNA on the .NET Framework to .NET 6. Under the .NET Framework, our configuration options were specified in the .xll.config file and these options were bundled ...
0
votes
1
answer
91
views
How to merge two ribbonui in excel by using c# with excel-dna package
I have two excel-addin project is wroted by C# with excel-dna package and the first add-in have a customui like follow:
<?xml version="1.0" encoding="utf-8" ?>
<customUI ...
1
vote
0
answers
110
views
Excel DocEvent stops working following TCP messaging
I am tracking user changes to a sheet:
((Excel.DocEvents_Event)app.ActiveSheet).Change +=
new Excel.DocEvents_ChangeEventHandler(Event_WorksheetChange);
If I change a cell's value, then my ...
0
votes
2
answers
191
views
Silent failure for callback in Excel add-in when using COM
Using Visual Studio 2022 and Excel 365...
I've been able to use ExcelDna for plenty of tasks. I run into trouble when I try to use the Excel COM interface directly.
To start, I define a button in the ...
2
votes
3
answers
474
views
Writing to Excel in F#
Has anyone got experience of writing values to an Excel spreadsheet from F# using Microsoft.Office.Interop? I can read values fine, but when I try to change the value of a cell I always get an error. ...
0
votes
0
answers
90
views
XmlSerializer formatter = new XmlSerializer(typeof(List<T>)) throws exception
I am using excel-dna to create an excel ribbon. I am saving the user settings using the xml serializer.
XmlSerializer formatter = new XmlSerializer(typeof(List<Config>));
this line of code was ...
0
votes
1
answer
200
views
Monitoring Excel's Edit Mode Via NativeWindow Subclassing Not Working In Excel DNA
Excel enters "Edit Mode" when a user performs one of the following actions: double clicks a cell, starts typing over it, keys F2, or clicks into the formula bar. When "Edit Mode" ...
0
votes
1
answer
364
views
Excel-dna Add-in opens Excel in the background after closing Excel
I wrote an Add-In using Excel-DNA.
Testing it in different Excel Versions (2016,365 on different PC with Win 10) with Excel-Add-Ins getting the .xll
Works fine - but when Excel is closed, a hidden ...
1
vote
1
answer
131
views
WPF Dialog Inside Excel Addin. Issues with Focus
I have an Excel add-in that I built with ExcelDNA and C#. The add-in utilizes the Essential Objects Browser within a WPF dialog. However, I'm encountering an issue when attempting to change the focus ...
1
vote
0
answers
262
views
Excel-DNA: Create WPF user control to be displayed after click on ribbon button
I'm coding some c# code in excel through excel-dna.
I've managed to create a custom ribbon with some buttons to execute methods.
However, I would like to create a WPF window/pop-up/user-control that ...
0
votes
0
answers
28
views
Conflicting results found in usage of IComparer being in Console App and Excel DNA
Requiring to build a UDF to be used in Excel, using Excel DNA, to present a result specially sorted in a jagged manner, using C#'s IComparer I was quite surprised as I was not getting a result ...
0
votes
0
answers
179
views
Wrapping XLOPER/XLOPER12 from Excel C Api in c# (with excel-dna ?)
I have a huge XLL (more than a hundred of functions) coded (in C) using the Excel C API.
I need to use several functions of this XLL in a C# code.
The code of these functions is quite an intricate ...
0
votes
2
answers
545
views
In Excel-DNA adding a new line in context menu at right-click on a cell in a spreadsheet
I would to do the following in Excel-DNA :
for any workbook referencing the xll, in any sheet of the workbook, at the right click on a cell, the normal menu appears (with "cut", "copy&...
1
vote
1
answer
375
views
Unable to write response in Excel using ExcelDNA in C#
I'm unable to write my REST API response in Excel using ExcelDNA in C#. It is working fine with reading values from specific column.
xlCell[i, 1] = "TEST"; // fails with System.Runtime....
0
votes
0
answers
832
views
.NET 6 Class Library with Winforms (output as DLL)
I'm trying to migrate a Class library project from .NET Framework using Excel DNA to .NET 6 - The project needs to output as a Class Library however also needs to include winforms - is there a way to ...
1
vote
1
answer
124
views
Get RCW's from Marshal to see which object is being held
I have an Excel add-in that needs a lot of long running references to Excel native objects. Every now and then when a user closes Excel it 'hangs' keeping an Excel process live in the background.
...
0
votes
0
answers
142
views
Excel can't find Excel-Dna.xll after Windows update
Developed Excel-DNA project in C# using .Net6. User installed SDK and was able to run. After windows / excel update started to fail with this message.
"Microsoft Excel cannot access the file xyz....
2
votes
2
answers
457
views
Publishing VSTO Office Add-In on Microsoft Store
I'm interested in finding out whether VSTO Add-Ins (or NetOffice, ExcelDNA, etc.) can be published and sold on the Microsoft Store.
In the past, this was not possible - reference here.
That said, ...
1
vote
0
answers
38
views
Why the DynamicMethod cant work in ExcelDna
I want to create user-defined formula in Excel addin by ExcelDna ,and before I get the api response I don't know the name of the formula.All of the formula is just like that(It's worked good):
public ...
0
votes
0
answers
27
views
Registry added through c#.Net is available in registry that able to read back, but not available anywhere in regedit [duplicate]
I added a registry key value from c#.Net:
using Microsoft.Win32;
string REGISTRY_PATH = @"SOFTWARE\Microsoft\Office\16.0\Excel\Options";
var ...
0
votes
1
answer
170
views
New functions added to external DLL do not work with ExcelDNA
I am trying to work out why, having returned to my ExcelDNA project that references my separate C# DLL for communication with a remote ActivePivot, when I add new functions to the DLL they merely ...
-1
votes
1
answer
282
views
use C# Excel DNA with C# Window Form
ContextSwitchDeadlock occurred Message: Managed Debugging Assistant 'ContextSwitchDeadlock' has detected a problem in 'C:\Program Files\Microsoft Office\Office15\EXCEL.EXE'. Additional information: ...
3
votes
0
answers
171
views
Is it possible to obtain an untranslated (English) formula from an Excel cell using Excel's C API?
I'm writing an Excel COM add-in, using Excel-DNA to register add-in functions. Within the add-in functions I'm using the Excel-DNA wrapper for Excel's C API to get various information from worksheets, ...
0
votes
1
answer
177
views
ExcelDna - Excel can't access function in base class
When Excel tries to call a method in a abstract base class i get a Run-Time error
"Cannot run Marco 'MarcoName'. The macro may not be available"
I can run code from the super class.
The code ...
0
votes
1
answer
306
views
How to calculate selected Excel range using ExcelDnaUtil.Application selection?
I'm writing a custom Excel add-in that assigns specific keyboard shortcuts to tasks such as number formatting for selected cells only. When I try to add a shortcut that will recalculate the selected ...
0
votes
1
answer
357
views
VBA interop with Excel-DNA
I am trying to implement Excel-DNA addin which can be called from VBA.
I am following Integrating with VBA
But the ExcelDna.Integration.CustomUI.ExcelComAddIn throw ExcelComAddIn is not available ...
0
votes
1
answer
923
views
How to auto build Excel-DNA addin in VS 2019
I am trying to auto pack Excel-DNA project.
I have followed Getting Started with Excel-DNA to create Excel-DNA project.
I followed Excel-DNA Packing Tool to pack my project which works.
I am trying to ...
1
vote
1
answer
161
views
Single Observer created for every unique Symbol
I am working on a .NET Application which is rendering data from a source (say TCP) to excel using the Excel-DNA Library.
I have given example of LtpObserver which I have created by implementing ...
0
votes
0
answers
122
views
Creating Excel named ranges does not work
I'm stuck here with a seemingly simple task. I'd like to create named ranges in Excel 2019 via Excel DNA on vb.net. I searched and tried every code example I could find but cannot reproduce their ...