Charting in Excel dna

Dec 30, 2014 at 6:14 AM
Hi,
I want to draw a pie chart and bar chart using excel DNA .I don't want to ref Interop excel to my add in. Is this possible by excel DNA. 

I also want to use .net text box in the excel ribbon. Please suggest some way of doing this 
Thanking you.
Coordinator
Dec 30, 2014 at 7:39 AM
Hi,

There are different options for talking to the Excel COM object model:
  1. Easiest is to reference the interop assembly, and check the "Embed Interop Types" setting. Your code will only work on Excel versions where the objects and methods that you call are available (the same as when you use VBA to talk to Excel).
  2. You can also use the .NET 4.0 "dynamic" support. You won't have to reference anything, but won't get any IntelliSense while you code.
  3. You can use the NetOffice assemblies - they are a union of the COM models of various versions, and the IntelliSense shows under which versions your code will work. You also have to redistribute extra assemblies.
You cannot embed any kind of control in the ribbon. The ribbon only works with the ribbon xml and callback functions. There are various links here: https://exceldna.codeplex.com/wikipage?title=Ribbon%20Customization&referringTitle=Documentation

-Govert