ExcelDna | repository contains the core Excel | Data Visualization library
kandi X-RAY | ExcelDna Summary
kandi X-RAY | ExcelDna Summary
Excel-DNA - Free and easy .NET for Excel. This repository contains the core Excel-DNA library.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ExcelDna
ExcelDna Key Features
ExcelDna Examples and Code Snippets
Community Discussions
Trending Discussions on ExcelDna
QUESTION
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 return #VALUE! and cannot seem to find any more information.
If I isolate the ExcelDNA part, and use methods from there, it all works. If I, in my new ExcelDNA function, call an existing function in the separate DLL it works however if I add a new function it fails. I just tried adding a very trivial function in the DLL (return 1+1) and it fails.
Has anyone else seen this sort of VisualStudio behaviour? The ExcelDNA and DLL were built in an older Visual Studio and this 'feels' like some sort of IDE / build weirdness! :S
I don't think it's ExcelDNA really although I've added that tag in case it's been seen by that community.
I'm going to try copy/pasting my code to a fresh DLL and build that.
Thanks
Leigh
Here follows two new simple methods that fail (Test() and QueryA(..)), and beginning of huge cube query (Query(....)) one that works. If the working query method is copied and given a new name this also fails.
...ANSWER
Answered 2022-Mar-31 at 11:07Thanks for reading and thanks Bradley for the comment.
It seems the Visual Studio project was corrupt, as I created a brand new project, copy/pasted the code into new classes and with the latest ExcelDNA Nuget packages and now I see expected behaviour from both ExcelDNA and my other DLLs.
QUESTION
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 use VS 2019 post-build event to achieve auto pack my project.
I copied the ExcelDna.Integration.dll
,ExcelDnaPack.exe
and ExcelDnaPack.exe.config
to my folder, and then use command below
ANSWER
Answered 2022-Feb-28 at 14:51The best way these days to make a new Excel-DNA add-in is to use the "ExcelDna.AddIn" package on NuGet.
If you start with a new "Class Library (.NET Framework)" project, and install the package, it should just work and all the packing etc. steps are built in.
If you are using the new SDK-style project files or PackageReference style NuGet references (instead of a packages.config file) then you'll need the prerelease version 1.6.0-Preview2 or later of the ExcelDna.AddIn package.
The best place to ask questions about Excel-DNA is the Google group at https://groups.google.com/g/exceldna
QUESTION
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 under ExcelDna.Integration.CustomUI
ANSWER
Answered 2022-Feb-28 at 14:45The best example of exposing classes from your Excel-DNA project to VBA is this one: https://github.com/Excel-DNA/Samples/tree/master/ComServerVB
The best place to ask questions about Excel-DNA is the Google Group here: https://groups.google.com/g/exceldna
QUESTION
Without putting entire ribbon xml, here is my button:
...ANSWER
Answered 2022-Jan-09 at 19:03Your Ribbon definition becomes invalid when you add the getScreentip
in your example because the screentip
and getScreentip
attributes are mutually exclusive (as per Microsoft's Ribbon XML specification), and they cannot be used together.
i.e. To use getScreentip
, remove the screentip
attribute.
QUESTION
We're trying to write a .xlsx file using a formula that would return a double[] using ClosedXml. The new versions of Excel are adding the Implicit Intersection Operator ('@') to the formula, and not allowing it to spill to the adjacent cells.
Is there a way to get it not to happen. Microsoft talks about setting Range.Formula2 (https://docs.microsoft.com/en-us/office/vba/api/excel.range.formula2), but I'm not sure if that's available through ClosedXml.
I'd rather not try to implement writing the file with OpenXml, as that seems very hairy.
Is there a way to do this?
Sample:
...ANSWER
Answered 2021-Aug-30 at 17:54You have to set the formula in a range of the output size, and put it between {}
:
QUESTION
So, I am trying to create a COM Add-In for 64-bit MS Office (no application in particular, just trying to get something working). I am not trying to make an add-in for the VBE, just something for the Office application itself. I have implemented IDTExtensibility2 like this (top of the file):
...ANSWER
Answered 2021-Jun-14 at 02:33So, after doing some research, this is what I found:
- Don't have Visual Studio register COM interop classes for you.
- Use the RegAsm tool with the /reg argument to have it generate a .reg file for you.
- Edit the .reg file and replace references to HKEY_CLASSES_ROOT with references to HKEY_LOCAL_MACHINE\SOFTWARE\Classes, if you don't want to require admin rights to install. Example:
QUESTION
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 value, and when the uTest1 function is called again, the vCallLevel value is increased by 1 again (MsgBox in the destructor is also not executed). This means that the Protected Overrides Sub Finalize () destructor is not called on exit. However, when I close Excel, I get MsgBox messages multiple times. What am I doing wrong?
...ANSWER
Answered 2021-Apr-28 at 13:37Here's an implementation of IDisposable
in VB.NET:
QUESTION
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:
...ANSWER
Answered 2020-Dec-24 at 11:35You need to convert the error value to a type that .NET will understand as a COM error type (like CVErr
in VBA).
There is an Excel-DNA helper that maps the C API error enums to COM error:
QUESTION
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 not work as expected as Excel-DNA is pre-processing the values in the array from excel.
e.g. null
is turned into ExcelDna.Integration.ExcelEmpty
This interferes with my own validation code that was anticipating a null
. I am able to work around this by adding an additional case to my pattern matching:
ANSWER
Answered 2020-Aug-20 at 22:25I have done some more digging and @Jim Foye's suggested question also confirms this. For UDF's, Excel-DNA works over the C API rather than COM and therefore has to do its own marshaling. The possible values are shown in this file:
The reason to use ExcelEmpty
(the user supplied an empty cell) is that for a UDF, the argument can also be ExcelMissing
(the user supplied no argument) which might both be reasonably null
and there is a need to disambiguate.
I will adjust my pattern matching to be compatible with both the COM marshaling and the ExcelDNA marshaling.
QUESTION
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" in the dna file, the following simple Excel command cannot be loaded. In fact, it is possible to compile, but the UDF command doesn't appear in the Excel add-in tab.
How can I use excel command in a program that uses ExcelDna registration?
...ANSWER
Answered 2020-Jul-12 at 14:48Once you set ExplicitRegistration
to true
, Excel-DNA expects you to register functions and commands yourself.
The same way that you call ExcelRegistration.GetExcelFunctions().RegisterFunctions()
to register functions, you can also call ExcelRegistration.GetExcelCommands().RegisterCommands()
to register commands.
e.g.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ExcelDna
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page