Keith Howard
Active member
- Joined
- Jan 28, 2010
- Messages
- 28
- Programming Experience
- 5-10
Hello,
For some years, I have been trying to convert my Excel VBA functions to Dot Net. The way I currently do this is by calling a VBA wrapper function, which then calls Dot Net code containing the real logic that I am trying to implement in the function.
Maintaining VBA wrapper functions, however, is cumbersome. In addition, this approach has the disadvantage that the Excel containing the wrapper function needs to be converted to a .xlsm file. I have a utility that enables me to search and replace over .xlsx files, but this utility does not work over .xlsm files. Therefore, I have been waiting for MS to provide a way to eliminate the VBA wrapper functions and to call Dot Net code directly.
I just came across the following write-up of Excel DNA, which seems to achieve this goal:
http://www.sysmod.com/vba-to-vb.net-xll-add-in-with-excel-dna.pdf
I was wondering if anyone had experience with this product. The idea behind this product sounds very appealing, but the documentation on Excel-DNA: Introducing ExcelDna - DotNet for Applications seems quite out of date, and I am using Office 2013 (with Excel version 15) and Dot Net 4.5.
Also, has MS put out any best-practice guidance for writing Excel functions that access Dot Net code?
Thanks in advance for your feedback.
Kind regards,
Keith
For some years, I have been trying to convert my Excel VBA functions to Dot Net. The way I currently do this is by calling a VBA wrapper function, which then calls Dot Net code containing the real logic that I am trying to implement in the function.
Maintaining VBA wrapper functions, however, is cumbersome. In addition, this approach has the disadvantage that the Excel containing the wrapper function needs to be converted to a .xlsm file. I have a utility that enables me to search and replace over .xlsx files, but this utility does not work over .xlsm files. Therefore, I have been waiting for MS to provide a way to eliminate the VBA wrapper functions and to call Dot Net code directly.
I just came across the following write-up of Excel DNA, which seems to achieve this goal:
http://www.sysmod.com/vba-to-vb.net-xll-add-in-with-excel-dna.pdf
I was wondering if anyone had experience with this product. The idea behind this product sounds very appealing, but the documentation on Excel-DNA: Introducing ExcelDna - DotNet for Applications seems quite out of date, and I am using Office 2013 (with Excel version 15) and Dot Net 4.5.
Also, has MS put out any best-practice guidance for writing Excel functions that access Dot Net code?
Thanks in advance for your feedback.
Kind regards,
Keith