Ribbon designer for a C++ addin

Jul 19, 2012 at 2:38 AM


I'm a Novice. I was wondering does this library allow ribbon design etc as well for UI?

i looked at add-in-express but it seems to be .net based. How can I design ribbons etc for a C++ addin?


thank you!

Jul 19, 2012 at 12:43 PM

You can call any Excel macro from a ribbon, but this library will only help you write the macro. http://chandoo.org/wp/2012/02/27/how-to-add-your-own-macros-to-excel-ribbon/ has some tips for doing this

Aug 21, 2013 at 4:18 PM
Aug 21, 2013 at 9:33 PM
Ouch. Looks painful. Why not use the latest tools that make it easy to design custom ribbons.
Aug 22, 2013 at 7:34 AM
Which tool? Would it require create another addin? I created it easily in c# but it would be great to have everything in one place.
I'm just starting to fight with ribbon in c++, let's see what will happen.
Aug 22, 2013 at 4:14 PM
In Excel 2010 you can create a ribbon using File > Options, Customize Ribbon. Export it to get the xml file and start customizing that.
Aug 22, 2013 at 5:28 PM
Edited Aug 23, 2013 at 5:51 AM
XML is not the problem at all. In current addin (C++) I'm trying to find a place in sources where IRibbonExtensibility interface should be added (http://msdn.microsoft.com/en-us/library/ee941475%28v=office.14%29.aspx). Any hint?

EDIT: OK, I think I know: just add completely new class and implement interface.
Aug 23, 2013 at 10:35 AM
Nice! I have now ActiveX in my XLL. I don't need external library anymore.
Next step: implement IRibbonExtensibility. We'll see...
Aug 24, 2013 at 12:50 PM
You should consider making your project open source, or at least spinning off a subset so other people can leverage off of what you've figured out.
Aug 24, 2013 at 5:43 PM
Edited Aug 24, 2013 at 6:00 PM
Unfortunately, there is an unacceptable issue: such dll (xll in this case) for proper registering (and probably working) would require XLCALL32.dll in classpath (I think it's xll.lib requirement). Maybe while using (creating) this control by xll code this library would be in path (didn't check), but registering (automatically) can be a very hard task.

Anyway, how I did it: create ATL project and just setup xll-related properties + additional tweaks (like /MT switch, precompiled headers, statically linking ATL [that way dll won't require atl110.dll for working], etc). That's all.
I think it could be a nice improvement for your project to have another template: "AddIn+ATL Controls" (of course if someone happen to find a nice way to register such xll as activex). New open source project for such simple thing is not a good idea ;)
Aug 24, 2013 at 6:25 PM
Why not use two separate dll's? Also, XLCALL32.dll is "special" in a way I do not completely understand. It shows up as unresolved in depends, but somehow Excel is able to load it. My guess is that it is delay loaded by EXCEL.EXE.
Aug 24, 2013 at 8:04 PM
You're right, now I back to two dll solution, currently fighting with XLCALL is waste of time.
Anyway one dll is more elegant, so I back to this case in the future ;)
Jun 27, 2014 at 12:05 PM
OK, I have ribbon working too (at last it's adding tab). The only requirement is to register xll properly using regsvr32.