Beginner Question: Moving from VSTO to Excel-DNA

471 views
Skip to first unread message

JayRob

unread,
Mar 21, 2017, 4:31:16 PM3/21/17
to Excel-DNA
Hello,

I've developed Excel C# add-ins using VSTO and Click-once. Because of some security changes at work, it looks like Excel-DNA is a very exciting and better way to go. I did try searching for answers, but I have not been able to find clear answers yet. I am hoping you can help me out. 
  • Where can I find a good Getting Started tutorial? I saw one for writing a function, and I got that to work. But I am looking for something that is a little more robust. Like adding a ribbon and when I click the button on the ribbon, it will perform some processing on the worksheets.  
  • I have seen a few examples for creating a ribbon. Is the only way to do it with XML or can you use the designer?  
  • Can I "convert" a current add-in to Excel-DNA? If so, how? If it is rewriting, I'm fine with that.  
Thank you for the help.

-J



Govert van Drimmelen

unread,
Mar 21, 2017, 6:42:18 PM3/21/17
to exce...@googlegroups.com
Hi Jay,

I've put together a small project and write-up that shows how to do a basic ribbon and some COM object model stuff - you can find it on GitHub here: https://github.com/Excel-DNA/Samples/tree/master/Ribbon

I've added a link to one designer tool for the ribbon xml - there are a few. You can also use the VSTO ribbon designer and export the ribbon customUI xml from there (particularly if you have an existing add-in). Basically all the tools end up making the same ribbon xml that you need for the Excel-DNA add-in, and it doesn't matter how you make the xml.

How difficult it is to port a VSTO add-in will depend on how much you use of the extensions that VSTO adds on top of the object model. The main aspects that I can think of are:
* Table / ListObject extensions
* the data binding support
* the ribbon implementation helpers, allowing you to write myButton.Enabled = false. The implementation of this is actually a local variable storing the desired 'enabled' setting, a getEnabled callback on the ribbon class, and some code that invalidates the control when the setting changes, triggering the callback again.

All of these VSTO extensions are implemented on top of the object model, so can be implemented by your add-in too. But it can be a lot of work.

On the other hand, anything in that is just regular COM object model use (not in the Microsoft.Office.Tools.XXX namespace) will work as-is in your Excel-DNA add-in.

I hope that gives you a bit more information to get started, and please post back if you run into specific issues.

Regards,
Govert



From: exce...@googlegroups.com [exce...@googlegroups.com] on behalf of JayRob [robb...@gmail.com]
Sent: 21 March 2017 04:42 PM
To: Excel-DNA
Subject: [ExcelDna] Beginner Question: Moving from VSTO to Excel-DNA

--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at https://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.

JayRob

unread,
Mar 23, 2017, 1:03:54 PM3/23/17
to Excel-DNA
Govert,

I really appreciate the detailed response and the link. This is all good news for me.

Thank you so much for the information and help.

-Jay
To post to this group, send email to exc...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages