SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
MaxCohen
Topic Author
Posts: 511
Joined: June 13th, 2007, 2:44 pm

Excel DNA + Excel 2010 + VS Express 2010

June 9th, 2011, 8:21 am

I have moved to Excel 2010 developing C# xll's using VS2010 express + ExcelDNA.Has anybody got this to work yet?I don't think ExcelDna is compatible with x64bit or .NET v4.0???Help please as this was working so well before on my vista + 2007 setup.
 
User avatar
ryans
Posts: 4
Joined: March 4th, 2011, 12:28 pm

Excel DNA + Excel 2010 + VS Express 2010

June 9th, 2011, 11:02 am

Yes, I use Excel 2010, VS.NET 2010 Express (C#) and ExcelDNA 0.29. I am working in .NET 4.0 (the dynamic feature is nice with Excel's object model). I believe I am still working in 32bit x86, though and not the x64 build of Excel. Of note is that I am not able to start Excel and debug in VS.NET 2010. The caveat I think is that for various reasons I'm working on the trial version of Excel right now. I was attributing my lack of debugging to the Excel trial version and the way it works (which is some wrapper around the excel.exe). Be aware that you need to modify the C# project file with notepad or other text editor to change the program to run on debugging. VS.NET Express GUI doesn't support this but will work fine when the .proj file is setup correctly.
 
User avatar
MaxCohen
Topic Author
Posts: 511
Joined: June 13th, 2007, 2:44 pm

Excel DNA + Excel 2010 + VS Express 2010

June 9th, 2011, 11:16 am

What should the .proj file look like?
 
User avatar
Govert
Posts: 103
Joined: January 28th, 2006, 10:02 am

Excel DNA + Excel 2010 + VS Express 2010

June 9th, 2011, 4:13 pm

The best place to ask about Excel-DNA is the Google group at http://groups.google.com/group/exceldna.The latest release for Excel-DNA (version 0.29) is now available on the CodePlex site: http://exceldna.codeplex.com. It adds support for the 64-bit version of Excel 2010. Support for .Net 4 was added with version 0.27 in August 2010.Some issues you might be running into:* The default target framework version under Visual Studio 2010 is .NET 4. To tell Excel-DNA that it should load the .NET 4 runtime, you need to explicitly add a RuntimeVersion="v4.0" attribute in the .dna file. The error message when you have this problem is pretty descriptive though.* Under Excel 2010 64-bit version you need to use the corresponding ExcelDna64.xll. If you have the wrong bitness for your .xll, Excel will merely complain that the file "is in a different format than specified by the extension."* Under Excel 2010 64-bit version, only .NET 4 is currently supported. * When debugging, you might need to set the framework version for the debugger to match the .NET version your add-in uses.* When trying to debug managed code hosted in a native process from an express edition of Visual Studio, you need to make some changes in the .csproj file.This thread on the Google group gives more details and some links for the last two issues, including the changes you need to make to the project file.If you still have problems after reviewing these issues, you are welcome to post to the Google group of contact me directly.-GovertExcel-DNA - Free and easy .NET for Excel.
 
User avatar
MaxCohen
Topic Author
Posts: 511
Joined: June 13th, 2007, 2:44 pm

Excel DNA + Excel 2010 + VS Express 2010

June 9th, 2011, 6:27 pm

Yes I fixed it are readinghttp://exceldna.typepad.com/with<DnaLibrary RuntimeVersion="v4.0"> <ExternalLibrary Path="Test.dll" /></DnaLibrary>
 
User avatar
Cuchulainn
Posts: 59713
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Excel DNA + Excel 2010 + VS Express 2010

April 10th, 2012, 10:44 am

We (Andrea Germani and io) are using Excel-DNA. It is easy to write rate curve applications etc. and this is what we are writing up. The next issue is general documentation. I am 'reverse engineering' the code to 1. Explain to readers what is going on (forward engineering).2. Explain what features of C# are being used in Excel-DNA.3. A 101 example A-Z to show the functionality.4. Rate curve example.I have used Reflection API to look at ExcelDna. Integration.dll but it only gives types + methods, but no explanation of what all these do. No XML file floating around.It would save a lot of time; but I suppose developers are not dispensed to write such (useful) documentation.I will survive but making life easier is also nice. Excel-DNA is very user-friendly in our opinion and ideal for certain classes of applications.
Last edited by Cuchulainn on April 9th, 2012, 10:00 pm, edited 1 time in total.
 
User avatar
Govert
Posts: 103
Joined: January 28th, 2006, 10:02 am

Excel DNA + Excel 2010 + VS Express 2010

April 10th, 2012, 4:04 pm

I'm glad you're giving Excel-DNA a good look!Most of the learning curve is getting to know the various Excel interfaces - the native C API / COM automation / RTD servers.Apart from the various posts and projects off the Excel-DNA CodePlex site, you'll also find lots of detailed info on the Excel-DNA Google group, which also has keyword search if you're looking for anything specific.No need to use reflection to look inside though - you have all the source code ;-)Anyway, looking forward to your writings.-GovertExcel-DNA - Free and easy .NET for Excel
 
User avatar
Cuchulainn
Posts: 59713
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Excel DNA + Excel 2010 + VS Express 2010

April 10th, 2012, 4:21 pm

Thanks, Govert. Initially, we focus on the ease of Excel interfacing; later we can look at the 'internals' QuoteMost of the learning curve is getting to know the various Excel interfaces - the native C API / COM automation / RTD servers.Don't suppose any links to this examples? Would be very nice Like a tutorial.
Last edited by Cuchulainn on April 9th, 2012, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 59713
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Excel DNA + Excel 2010 + VS Express 2010

April 19th, 2012, 11:49 am

101 slide show of Excel-DNA edit: Ed, audio show on the way
Last edited by Cuchulainn on April 18th, 2012, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 59713
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Excel DNA + Excel 2010 + VS Express 2010

April 26th, 2012, 9:06 am

Feature request.A must-have is to have Intellisense 1-line explanation of each entity in the ExcelDna object model. This should have been done imo when creating the classes at birth. It is not a great deal of extra effort on the part of the developer.On the one hand I had a bit more time than quants to reverse-engineer the code but it would waste less time if someone would write a tutorial.I can get a tree view in VS2010 but it has no corresponding XML file. In total, I reckon 20-30 manhours work would be enough to finish this project. Example: this is just enough
Last edited by Cuchulainn on April 25th, 2012, 10:00 pm, edited 1 time in total.
 
User avatar
Govert
Posts: 103
Joined: January 28th, 2006, 10:02 am

Excel DNA + Excel 2010 + VS Express 2010

April 27th, 2012, 9:38 am

Hi Daniel,Thanks for the encouragement.The simplest 'Getting Started' information is here: http://exceldna.codeplex.com/wikipage?t ... %20Started. This will get you going with a simple function in VB.NET or C#, and ensures that the basics are in place - the .NET runtime and the Excel security settings.I've also uploaded the step-by-step instructions to make a C# Excel-DNA add-in using Visual Studio that I sent you in August - there's now a link here: http://exceldna.codeplex.com/documentation.I also have a detailed write-up and an example of porting a small VBA add-in to Excel-DNA. The ported add-in and detailed documents are here: http://rwdvc.posterous.com/riskgen-in-vbnetFor questions and suggestions, the most effective location will be the Excel-DNA Google group.Of course there is always room for improving the project and its documentation, and any help is appreciated :-)-GovertExcel-DNA - Free and easy .NET for Excel
 
User avatar
Cuchulainn
Posts: 59713
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Excel DNA + Excel 2010 + VS Express 2010

April 27th, 2012, 12:29 pm

Govert,I will try to get some of our application examples on the site at some stage soon. I'll get back on this. Thanks.
 
User avatar
Cuchulainn
Posts: 59713
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Excel DNA + Excel 2010 + VS Express 2010

April 30th, 2012, 12:27 pm

Govert,BTW any good examples of charting in Excel-DNA? Can I just use the standard C# code that I always use? (I suppose I could answer this question by trying it myself ) What I am asking really: Excel-DNA and Excel Object Model can live happily together?
Last edited by Cuchulainn on April 29th, 2012, 10:00 pm, edited 1 time in total.
 
User avatar
Govert
Posts: 103
Joined: January 28th, 2006, 10:02 am

Excel DNA + Excel 2010 + VS Express 2010

April 30th, 2012, 9:45 pm

Yes - you can access the Excel COM object model from within the Excel-DNA add-in.You get to the correct Application object for the Excel instance you are running in by calling ExcelDnaUtil.Application. -GovertExcel-DNA - Free and easy .NET for Excel
 
User avatar
Cuchulainn
Posts: 59713
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Excel DNA + Excel 2010 + VS Express 2010

September 27th, 2012, 12:11 pm

Silly questionIs there a way to have the DNA .dll (.xll) permanently loaded or do I have to activate it each time I start Excel?With COM and Automation I can have them on the ribbon forever.Thanks
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On