Questions tagged [excel-dna]
Excel-DNA is an independent open-source project to integrate .NET into Excel. It allows creation of Excel add-ins, including high-performance user-defined functions, using managed code.
367
questions
0
votes
0
answers
7
views
ExcelDna use ExcelDnaUtil.Application in other class report error System.InvalidOperationException
I hava a UDFGenerator class and a UDFtest class,in UDFGenerator I created a static variable based on ExcelDnaUtil.Application, and use it in a static function, if that all in the UDFGenerator it's ...
0
votes
1
answer
20
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
14
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
24
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
44
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
37
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
76
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
19
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
51
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
25
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
66
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 ...
0
votes
0
answers
20
views
CustomXMLParts XPath returns Null for an existing tag
I have a CustomXMLParts in a C# project:
const string ns = "https://address";
CustomXMLParts userNamespaces = app.ActiveWorkbook.CustomXMLParts.SelectByNamespace(ns);
CustomXMLPart rootTag;
...
1
vote
1
answer
33
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
64
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 ...
0
votes
1
answer
44
views
ExcelDNA not working when getScreentip ribbon xml attribute is set
Without putting entire ribbon xml, here is my button:
<button id="getLatestCEVersion" keytip="N" label="Download Latest" screentip="Download latest version of ...
0
votes
1
answer
75
views
Excel COM Add-in installation permanently
I have an Excel COM add-in which is written with Excel DNA in xll format which should be enabled permanently. As I plan to install it to multiple machines.
My attempt is to create the below registry ...
0
votes
0
answers
68
views
RTD Server - How to use an old RTD server (used to work on Excel 2010/Win 7) under Excel 365 64 bit Win10?
As I'm trying for some time now to get an RTD digital clock to be working on Excel 365/Win 10, I ran into this post:
Convert Excel RTD library to Excel-DNA while retaining =RTD( interface (64 bit ...
0
votes
1
answer
83
views
Custom task pane height not fully expanded empty space remains
I have problem with height of custom task pane in Excel. This task pane is created from Excel AddIn which is created using Excel-Dna library.
When docked to the left side with MsoCTPDockPosition....
0
votes
1
answer
63
views
Detect if array function was called as legacy array (ctrl+shift+enter) or as dynamic array (enter)?
[ExcelFunction(Description = "Check if function was called as dynamic array or not")]
public static bool IsDynamicArray()
{
//What goes in here?
}
I'd like to know the answer to this ...
0
votes
1
answer
46
views
Excel AddIn installed and uninstall event
I am trying to load excel xll addin in Excel VSTO.
I used Globals.ThisAddIn.Application.AddIns.Add and .Installed to install and uninstall xll
AddIn intelliSenseAddIn = default;
...
0
votes
2
answers
178
views
Disable excel convert string to date while opening csv file
I am trying to disable excel to convert normail string like 1-2 to date 1/2/2021, I know there is no default settings to disable this behavior.
I am wondering whether there is any event to be fired ...
0
votes
1
answer
30
views
About Excel Available add-ins
I wrote a .xll plugin and selected Excel add in(COM and Excel Add-ins). It's No problem with plugin execution. But when I close my excel and open again, I found my .xll plugin is not excute and open ...
1
vote
1
answer
54
views
How do I amend parameters in a Quantlib Option?
So, I've built a PlainVanilla option in the C# QuantLib wrapper. This is then running in Excel to provide the greeks via Excel DNA. It's all working well.
What do I do, for example if the Underlyer ...
1
vote
2
answers
108
views
ExcelDNA RTD with SignalR
I'm trying to hook up ExcelDNA RTD with a ASP.NET SignalR server.
Whenever there is a change on the server a message get pushed to the connected clients, and my ExcelDna add-in is getting the new ...
0
votes
0
answers
68
views
How to get the Cell Address for each cell in an array function?
I've created an RTD UDF with Excel-DNA, it's working perfectly when used in a single cell, but when I use it as an array function I get problems.
From the array {=MyFunction()}, when I call XlCall....
0
votes
1
answer
87
views
The problem of using the Constructor and Class Deconstructor in Excel-DNA VB.net
In this code, I expected that the vCallLevel variable inside the uTest1 function will be equal to 1, and upon exiting it will be reset to 0.
However, when returning from the function, it retains its ...
1
vote
0
answers
59
views
Exceldna / WPF Window keyboard input is redirected to Excel
I have an Excel-dna addin which creates a WPF window with a Textbox in it and show it.
When i call Window.Show() and type something into the Textbox, the keyboard input is redirected to the selected ...
0
votes
0
answers
44
views
Errors with EXCEL-DNA - XlCall.xlcOnKey - Calling Method with Parameters - Registered Shortcut with Parameters
I would like to register a shortcut to a method with parameters.
This works (no parameters) with no side effects or errors
XlCall.Excel(XlCall.xlcOnKey, "^+{h}", "MyMethod");
...
1
vote
1
answer
83
views
Set some of the Excel Chart Series values to #N/A using Excel-DNA or Excel.Interop
I am using ExcelDNA and Microsoft.Office.Interop.Excel to set some of the y values of a given Excel chart series to #N/A. (*)
This is what I am trying to achieve in VBA. This works as expected:
Sub ...
0
votes
1
answer
52
views
ExcelDNA C# Chart.MouseDown event firing only once
i'm tryng to have an handle the event every time I click on a chart, on each worksheet of an opened workbook.
I'm using the SheetActivate event like this:
private static void Xlapp_SheetActivate(...
0
votes
1
answer
248
views
Excel-Dna Volatile Functions in Massive Updating Spreadsheet
I have created an Add-In using Excel-Dna and marked the exported functions as Volatile (IsVolatile=true) which gives me the desired behavior. Functions make use of simple queries to retrieve data from ...
0
votes
1
answer
133
views
Get excel selection content when clicking a ribbon button using exceldna
I'm trying to read and update the user's Selection (the excel's range currently selected). This must happens when the user click on the custom ribbon's button.
Ribbon works well (basic functions like ...
0
votes
0
answers
71
views
Excel crash while trying to insert VSTO addin formula from Office JS Taskpane
I am facing an odd issue while connecting VSTO addin formula with office js taskpane. Below is the scenario
There is one VSTO addin which has several formulas defined in it.
One newly created office ...
0
votes
1
answer
93
views
How to use xll package at other computer
I'm a learner about ExcelDNA.According to the example, I make it simple to test the package "FirstAddIn-packed.xll". When I finished it, I import it to excel and no problem and my computer ...
0
votes
1
answer
455
views
excel dna addins how pack unmanaged dll in xll file
I want use ml.net to make Excel function
ml.net in .NET framework classics need one unmanaged dll ...
when I manually copy dll in debug folder all work great .
excel DNA not support unmanaged dll that ...
1
vote
1
answer
76
views
Excel DNA UDF obtain unprocessed values as inputs
I have written several helper functions in F# that enable me to deal with the dynamic nature of Excel over the COM/PIA interface. However when I go to use these functions in an Excel-DNA UDF they do ...
0
votes
1
answer
257
views
How can I avoid Excel-DNA add-in from locking external library dlls?
I was building an Excel-DNA add-in with an auto update feature, as per @Govert's suggestion on another stack overflow question I used parts of the add-in reloaded sample to reload the add-in when a ...
0
votes
1
answer
166
views
Excel-Dna: Co-existence of ExcelCommand and ExcelDNA.Registration Package
I would like to write the ExcelCommand UDF in the C# program that uses the ExcelDNA Registration package.
However, in order to use the Registration package, if I set explicitRegistraiton="true&...
1
vote
3
answers
121
views
How to make ExcelDna functions from Nuget.org package visible in the package user's Excel session
I have created a Nuget.org package, with the following (abridged) code:
namespace MyNugetPackageNS
module MyNugetModule =
open ExcelDna.Integration
// this function is NOT seen ...
0
votes
1
answer
341
views
Excel DNA - Best Way to Use Config Transforms
I have a project, lets call it 'ProjectX' which needs to use Excel DNA. Development is successful, however, I am unable to resolve one issue. The project uses config transforms to update values in app....
1
vote
0
answers
138
views
Excel DNA IntelliSense stopped working suddenly
We have used Excel DNA IntelliSense for creating UDFs in our VSTO application and was running fine. Suddenly the IntelliSense stopped working. They work when we run the code through Visual Studio but ...
0
votes
1
answer
132
views
Excel-DNA, issue with firing Ribbon's onAction code. F#
I am on Excel 2010 and trying to run the Excel-DNA/Samples code for ribbon customization in F#.
<tab id='CustomTab' label='My F# Tab'>
<group id='SampleGroup' label='My Sample Group'>
...
0
votes
1
answer
637
views
How to access range selected in excel through ExcelDNA in C#?
I am noob with Excel DNA and C# programming. This must be one of the basic questions, and if it's already been answered on SO, I would be more than happy if I'm pointed in that direction. I am trying ...
0
votes
1
answer
364
views
Application events, determine when Excel is really ready to read from
I've been looking at allowing an application to link with Excel using either COM interop or Excel-dna. Ideally users can link ANY Excel workbook which may or may not contain VBA code. Typically ...
0
votes
1
answer
373
views
How do I detect a reference to an empty cell using Excel-DNA?
//when the following line encounters a reference to
//an empty cell, the method returns #VALUE
''''
double val = dataRange[0];
return val;
''''
[ExcelFunction(IsMacroType = ...
0
votes
2
answers
926
views
C# Excel-DNA debugging
I am trying to build custom user defined functions with excel-dna. What is a possible way to debug the custom functions, I.e. set breakpoints, add watch windows etc? Is it possible to do it on visual ...
1
vote
1
answer
236
views
Excel-DNA: Unregister methods in a running instance of Excel
Is it possible to unregister methods that I previously registered via ExcelIntegration.RegisterMethods without restarting Excel?
Basically, I'm looking for the opposite of ExcelIntegration....
2
votes
1
answer
123
views
Excel DNA function without parameters still shows one parameter in Excel function wizard
Consider function MyFunc without parameters:
[ExcelFunction(Name = "MyFunc", Description = "My func")]
public static object MyFunc()
{
return "My-Func";
}
Although it has no parameters, when ...
2
votes
2
answers
490
views
How to pass discontinuous range of cells from Excel to ExcelDNA function
Consider such ExcelDNA function definition:
[ExcelFunction(Name = "Fnc1", Description = "Fnc1")]
public static object Fnc1(
[ExcelArgument(Name = "Arg1", Description = "Arg1", AllowReference = ...
1
vote
1
answer
111
views
Chain function calls using Excel-Dna
Is it possible to chain function calls using Excel-Dna?
I am trying to call something like this from Excel Sheet:
=CreateAccount(CreateUser("John","Doe"))
But the inner function CreateUser returns ...