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.

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.

It has at least partial supported for all versions of Excel from 97-2013.

Advanced Excel features are supported, including multi-threaded recalculation (Excel 2007 and later), registration-free RTD servers (Excel 2002 and later) and customized Ribbon interfaces (Excel 2007 and 2010). There is support for integrated Custom Task Panes (Excel 2007 and later), offloading UDF computations to a Windows HPC cluster (Excel 2010 and later), and for the 64-bit versions of Excel 2010 and 2013.

386 questions
0
votes
1 answer

ExcelDna/NetOffice/Excel: Most efficient way to insert values?

I'm building an addin for Excel using ExcelDna and NetOffice and fetch data from various source and insert this into worksheets. My problem is that the insertion of data in the worksheet is really slow. What is the most efficient way of inserting…
Niels Bosma
  • 11,758
  • 29
  • 89
  • 148
0
votes
1 answer

SecurityException occured, Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib'

On this line I get the following exception: using (Stream reader = File.Open(m_inputFile, FileMode.Open)) Exception: The message is: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0,…
BlueTrin
  • 9,610
  • 12
  • 49
  • 78
0
votes
1 answer

Singleton pattern and server connection using excel-DNA

I have an SQL database. Then in one class I have an ExcelFunction: [ExcelFunction(Description = "fonction de recherche")] public static double id(string _isin) { double res; res =DBSQL.Instance.getID(_isin); return res; } Then in anoher…
0
votes
1 answer

Find occurrences of an Excel formula with Excel-Dna

Using Excel-Dna I'd like to search all open workbooks in an Excel instance for the number of occurrences of a particular formula. My best hunch so far is that I need to XlCall the xlcFormulaFind function as documented…
MarkNS
  • 3,811
  • 2
  • 43
  • 60
0
votes
1 answer

ExcelDNA Memory Space

I am writing an application that has multiple potential user interfaces and I am using MEF to inject the appropriate implementation during startup. One implementaiton of IDisplay uses ExcelDNA (Excel is the interface). The code launches Excel as a…
clicky
  • 865
  • 2
  • 14
  • 31
0
votes
2 answers

schedule workbooks to run at different time in Excel AddIn

I have an Excel AddIn written in C#, Excel-DNA, NetOffice On each workbook, users can run some process to fetch data (using REST web service) from a server. Now users want to automatically refetch data (refresh) on each workbook at different…
toosensitive
  • 2,335
  • 7
  • 46
  • 88
0
votes
1 answer

Events for DropDown placed inside Excel

I am creating several DropDowns in Excel sheet using ExcelDNA, NetOffice and C#. Dropdowns are shown correctly, however I can't figure out how to bind an event each time the selection is changed. As you notice bellow I am binding to SheetChange…
Jim
  • 2,760
  • 8
  • 42
  • 66
0
votes
1 answer

C# how to detect if Excel has lost focus

I have an Excel AddIn (written in C# and ExcelDNA) with a form used to allow the user to enter data into a control inheriting from a textbox. The form is modal. Entry into the control causes a contextmenu to appear with choices based upon the…
Lee Z
  • 802
  • 2
  • 13
  • 39
0
votes
1 answer

Custom Menu Command not shown on Add-Ins tab in Excel

I am testing Excel-Dna and want to a button in Excel that runs some simple code. As I understood it the following code should add a button in the Add-Ins tab in Excel: using System; using System.Collections.Generic; using System.Linq; using…
Remko
  • 7,214
  • 2
  • 32
  • 52
0
votes
0 answers

How to import string with "\" (backslash) from Excel into C# using Excel DNA

To give some context, I have a spreadsheet that prices financial derivatives by running a Monte Carlo simulation on an arbitrary user input payoff function that is defined by a string (a Python lambda expression). This is passed from Excel to my C#…
Ben
  • 1,638
  • 2
  • 14
  • 21
0
votes
1 answer

App config problems

I am using a library called Excel DNA which allows you to create excel addins. I have created a C# library and a .dll.config file is created as usual. Unfortunately excel needs the config file to be called .xll.config. How do I change the output…
TJF
  • 1,081
  • 1
  • 12
  • 26
0
votes
1 answer

How to separate CustomUI tags in Excel-DNA from OnAction methods?

In my .dna file I have:
Excel Developers
  • 2,785
  • 2
  • 21
  • 35
0
votes
1 answer

Argument type validation in the Function Wizard

In Excel, the DATE function for example shows "=number" against each field. If I enter a string in these fields in place of a number, I get the #VALUE! error. Can similar functionality be achieved with Excel-DNA?
0
votes
1 answer

How to show "You've entered too few arguments for this function" message

How to show "You've entered too few arguments for this function" message in custom functions created using Excel DNA?
Beryl Wilson
  • 125
  • 8
0
votes
1 answer

VBA Match to C#

I'm converting Excel VBA to C# (using a VSTO project in Visual Studio .NET). The bellow code is puzzling me, since there are no similar function in C#. result = Application.WorksheetFunction.Match(stringA, Range(stringB), 0) If result = 0 Then…
Jim
  • 2,760
  • 8
  • 42
  • 66