excel-dna

Using sqlcompact with how excel-dna

做~自己de王妃 提交于 2021-02-11 13:47:41
问题 when I use sqlcompact in excel-dna,At sqlceca40.dll I could not packed xll.So I my excel.xll is not work. 回答1: This is not a supported scenario by ExcelDnaPack at the moment. ExcelDnaPack only supports packing of .NET assemblies (a.k.a. managed DLLs). sqlceca40.dll is a Win32 DLL... Therefore you won't be able to pack that DLL in your XLL using ExcelDnaPack . You could use alternative approaches to embed the sqlceca40.dll into your add-in assembly using a tool such as Fody.Costura, for

Using sqlcompact with how excel-dna

♀尐吖头ヾ 提交于 2021-02-11 13:45:31
问题 when I use sqlcompact in excel-dna,At sqlceca40.dll I could not packed xll.So I my excel.xll is not work. 回答1: This is not a supported scenario by ExcelDnaPack at the moment. ExcelDnaPack only supports packing of .NET assemblies (a.k.a. managed DLLs). sqlceca40.dll is a Win32 DLL... Therefore you won't be able to pack that DLL in your XLL using ExcelDnaPack . You could use alternative approaches to embed the sqlceca40.dll into your add-in assembly using a tool such as Fody.Costura, for

Excel DNA with ILNumerics

淺唱寂寞╮ 提交于 2021-01-28 21:29:20
问题 I have used ILNumerics via Excel DNA in Excel successfully for some time. Now I wrote a new function which uses the linsolve function from ILNumerics (which needs the mkl_custom.dll) and I cannot build this into an XLL. My custom function works in debug which is why I assume sth in the packaging goes wrong. Here is my dna file: <DnaLibrary Name="Nik's Lib" RuntimeVersion="v4.0"> <ExternalLibrary Path="MyLib2010.dll" Pack="true"/> <Reference Path="ILNumerics.dll" Pack="true"/> <Reference Path=

How to pass discontinuous range of cells from Excel to ExcelDNA function

一世执手 提交于 2020-07-21 07:43:14
问题 Consider such ExcelDNA function definition: [ExcelFunction(Name = "Fnc1", Description = "Fnc1")] public static object Fnc1( [ExcelArgument(Name = "Arg1", Description = "Arg1", AllowReference = true)] object rng) { // ... } It works fine when called with a single cell like this =Fnc1(A1) or with continuous range of cells like this =Fnc1(A1:A3) . But it doesn't work when called with discontinuous range of cells e.g. =Fnc1(A1,A5,A10) . The error #VALUE! is returned. Is there a way how to call

Excel-DNA Add-In with connection strings stored in external configuration file

牧云@^-^@ 提交于 2020-02-25 06:56:28
问题 I'm using Excel-Dna in a project where connection strings are stored in an external file called connections.config , which is referenced in the App.config file. When building the project, both config files are copied to the bin folder and the App.config file is renamed <Name>-AddIn64-packed.xll.config as it should be. The problem is that the packed xll still relies on both config files. Everything works fine when including the connection strings directly in the App.config , but I need to keep

ExcelDna F# and optional arguments

前提是你 提交于 2019-12-23 03:37:17
问题 For scalar (i.e. non array-like) optional arguments, I would use this pattern : [<ExcelFunction(Category= "Test", Description= "Test optional arguments.")>] let test_test1 ([<ExcelArgument(Description= "Optional. This is a double. Default is 42.0.")>] arg1 : obj) : double = match arg1 with | :? ExcelMissing -> 42.0 // the argument was missing | :? double as d -> d // the argument was a double | _ -> -1.0 // otherwise I am not sure if this code is "idiomatic" within Excel-Dna / F# but it seems

Remove AddIn path from UDF in Excel formula

风格不统一 提交于 2019-12-18 08:59:05
问题 My addin was xla, now I use excelDNA, so it becomes xll, When I open spreadsheet built in previous version of My addin, for the UDF, it shows myUDF with path of xla. e.g "C:\Program Files\Installation folder\MyUDFs.xla!MyUDF", when I click Edit link and change source to "C:...\MyUDFs.xll" I got a pop up which says "Excel cannot update one or more links in this workbook. To update the links, open all the link source files(click Edit Links on the Data tab). To be sure all calculations are

Argument type validation in the Function Wizard

橙三吉。 提交于 2019-12-13 05:13:05
问题 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? 回答1: I don't think Excel supports a way to show those types for user-defined functions. Excel-DNA registers functions with the right types (like taking a Double). Excel completely controls how things are displayed in the Function Arguments dialog, and some aspects only work for built

How to re-trigger GetCustomUI() from ExcelDNA

馋奶兔 提交于 2019-12-12 17:02:13
问题 I have, in ExcelDNA, created a custom ribbon (extending ExcelRibbon) and overridden the GetCustomUI() method to create a menu control from a list of strings. Basically: public override string GetCustomUI(string RibbonID) { string customUIXml = @"<customUI xmlns='http://schemas.microsoft.com/office/2006/01/customui' loadImage='LoadImage' onLoad='OnRibbonLoaded' > <ribbon> <tabs> <tab id='CustomTab' label='My Dynamic Tab'> <group id='SampleGroup' label='My Sample Group'> <menu description=

Passing by ref a parameter to macro calling a excel DNA function with Application.Run

亡梦爱人 提交于 2019-12-12 05:18:57
问题 I have a c# function defined through excel DNA : [ExcelFunction(Description = "does stuff", IsVolatile = false, IsMacroType = true, IsThreadSafe = true)] public object AFunction(long k \* other parameters *\) { // do stuff } that is called in VBA as follows : Dim v As Variant v = Application.Run("AFunction", k) Now I modify my excel DNA c# as follows : [ExcelFunction(Description = "Retrieves valo folio", IsVolatile = false, IsMacroType = true, IsThreadSafe = true)] public object AFunction(ref