Serving the Quantitative Finance Community

Search found 103 matches

  • 1
  • 3
  • 4
  • 5
  • 6
  • 7
by Govert
May 5th, 2011, 4:30 pm
Forum: Programming and Software Forum
Topic: ATL-COM dll with only Simple Object wrapped in C# and then callable from Excel
Replies: 18
Views: 23919

ATL-COM dll with only Simple Object wrapped in C# and then callable from Excel

<t>QuoteOriginally posted by: Hansi So ATL + RCW wrapper vs XLL + DNA bridge?Well, kind of. From the original post, there are two interface layers required:1. New C# code <-> Existing ATL COM libraries2. Excel <-> New C# codeFor 1. the RCW is the interface and it is generated by Visual Studio when a...
by Govert
May 5th, 2011, 4:21 pm
Forum: Programming and Software Forum
Topic: ATL-COM dll with only Simple Object wrapped in C# and then callable from Excel
Replies: 18
Views: 23919

ATL-COM dll with only Simple Object wrapped in C# and then callable from Excel

<t>QuoteDoes the presence of a .dna file in Excel-DNA affect performance?No.The primary role of the .dna file in Excel-DNA is as a configuration file for the unmanaged part of add-in, and the managed AppDomain it creates. In a normal .NET setting, that kind of configuration would be in the .exe.conf...
by Govert
May 2nd, 2011, 3:34 pm
Forum: Programming and Software Forum
Topic: ATL-COM dll with only Simple Object wrapped in C# and then callable from Excel
Replies: 18
Views: 23919

ATL-COM dll with only Simple Object wrapped in C# and then callable from Excel

<t>It might help if you can explain a bit more about what the role of the C# part will be, and how you then want to interact with your managed library from Excel.If you are re-implementing code that is currently in VBA, you might want to consider VB.NET as a much smoother route to managed code. You ...
by Govert
April 13th, 2011, 10:56 am
Forum: Numerical Methods Forum
Topic: Improve performance of Excel Solver and alternatives in C++
Replies: 82
Views: 47629

Improve performance of Excel Solver and alternatives in C++

<t>You can deal with the .dll location issue by calling LoadLibrary explicitly from your VBA code, before you call the other functions in the library.To call LoadLibrary from VBA you need this Declare:Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As St...
by Govert
April 3rd, 2011, 7:23 am
Forum: Programming and Software Forum
Topic: xll library for creating Excel add-ins
Replies: 76
Views: 46513

xll library for creating Excel add-ins

<t>Hi Keith,QuoteOriginally posted by: kimosabeNote that well behaving addins unregister every function in xlAutoClose that was registered in xlAutoOpen.You need to be a bit careful here. Excel will call xlAutoClose when the user starts to close Excel (say they press Alt+F4 or the close button), but...
by Govert
March 7th, 2011, 11:21 am
Forum: Programming and Software Forum
Topic: C# Numerical Library
Replies: 14
Views: 33674

C# Numerical Library

<t>You might have to look at a few libraries to satisfy all your requirements. For the basic linear algebra there are many options, but as you start looking for optimization libraries the choices get more tricky.Start with Math.NET Numerics, which is free and actively under development, coming out o...
by Govert
February 28th, 2011, 2:25 pm
Forum: Programming and Software Forum
Topic: managed C++ dll and Excel Range
Replies: 26
Views: 27766

managed C++ dll and Excel Range

Perhaps Tableau->get_Value(0,0) ?Value is a "parameterized property" which caused problems in C# before version 4. Maybe the C++/CLI binding has similar issues.
by Govert
January 30th, 2011, 2:48 pm
Forum: Programming and Software Forum
Topic: Excel RTD and DDE
Replies: 16
Views: 28802

Excel RTD and DDE

Yes, that's exactly the problem.
by Govert
January 29th, 2011, 10:28 pm
Forum: Programming and Software Forum
Topic: Excel RTD and DDE
Replies: 16
Views: 28802

Excel RTD and DDE

<t>Hi Max,You need to take some care when getting the Application object using GetActiveObject.In some contexts, if different instances of Excel are running, your code might return an interface to the wrong instance of Excel.(GetActiveObject gets the interface from the Running Object Table, where on...
by Govert
January 25th, 2011, 8:47 pm
Forum: Programming and Software Forum
Topic: Excel RTD and DDE
Replies: 16
Views: 28802

Excel RTD and DDE

<t>Hi Max,Your wrapper doesn't work because you are creating a new instance of Excel. You need to call the RTD function on your hosting instance.Using Excel-DNA you would call ExcelDnaUtil.Application to get hold of the right COM object (or you could just call xlfRtd using the C API).If, as it seems...
by Govert
November 26th, 2010, 1:15 pm
Forum: Programming and Software Forum
Topic: Excel C API - nonvolatile cell dereferencing - function mode vs macro mode
Replies: 2
Views: 24548

Excel C API - nonvolatile cell dereferencing - function mode vs macro mode

<r>Hi Caspar,As you note, and the Excel SDK docs state: "By default, functions that take type R XLOPERs or type U XLOPER12s and that are registered as macro sheet equivalents (type '#' - see next section) are handled as volatile in Excel."But you can clear the volatile-ness inside your function by c...
by Govert
November 5th, 2010, 11:36 am
Forum: Programming and Software Forum
Topic: Excel XLA reference being converted to an external file reference
Replies: 11
Views: 25637

Excel XLA reference being converted to an external file reference

Oops, I meant HKEY_CURRENT_USER.The subkey HKEY_CURRENT_USER\Software\Classes\ is checked when doing COM activation too, so you can add the ProgId for the RTD server there.
by Govert
November 4th, 2010, 10:40 am
Forum: Programming and Software Forum
Topic: Excel XLA reference being converted to an external file reference
Replies: 11
Views: 25637

Excel XLA reference being converted to an external file reference

<r>Indeed - from your c++ .xll you need not use WorksheetFunction.RTD(...) to make the RTD call, you can use Excel4(xlfRtd..) or Excel12(xlfRtd...). So you need no COM in your C++ library to create the RTD wrapper functions.For the registration-free RTD support, Excel-Dna can dynamically register a ...
by Govert
November 3rd, 2010, 6:22 pm
Forum: Programming and Software Forum
Topic: Excel XLA reference being converted to an external file reference
Replies: 11
Views: 25637

Excel XLA reference being converted to an external file reference

<t>Hi,You could port your functions to VB.NET (or C#) and make an .xll add-in with Excel-Dna.One of the advantages of .xll add-ins is that you don't have this location dependency problem - you can move the .xll to another directory and your existing books work fine.If you are writing your own RTD se...
by Govert
October 15th, 2010, 11:05 am
Forum: Programming and Software Forum
Topic: Excel RTD server crash
Replies: 34
Views: 33251

Excel RTD server crash

<t>You suggested:"4. Only call UpdateNotify() when previous updates have already been retrieved"HorseRider replied:"I believe your 4th point just saved my life."While Microsoft says:"[...] UpdateNotify [...] can be called any time that the RTD server wants and as frequently as it wants."There is an ...
  • 1
  • 3
  • 4
  • 5
  • 6
  • 7