ExcelCommand in Excel 2013 (64)

Mar 13, 2013 at 6:15 PM
Hello

I have problem with commands in Excel 2013. When I try sample below, I get only one menu item named Enable Beep with submenu named Enable Beep (execution is possible on this level). Looks like MenuName does not work at all and MenuText works strange.
        [ExcelCommand(MenuName = "&TestOnRecalc", MenuText = "&Enable Beep")]
        public static void EnableBeep()
        {
            XlCall.Excel(XlCall.xlcOnRecalc, null, "Beep");
        }

        [ExcelCommand(MenuName = "&TestOnRecalc", MenuText = "Beep &Now")]
        public static void Beep()
        {
            Console.Beep();
        }
Anyone can help? It's known issue?

bartcho
Coordinator
Mar 14, 2013 at 8:00 PM
Hi Bartcho,

This is not something I've heard of before, but I'll add to my Excel 2013 list to check. Thank you for reporting the issue.

You might want to investigate adding a ribbon to your add-in - it's not too hard if you start with the samples, and it should work under Excel 2013.

-Govert
Mar 14, 2013 at 8:41 PM
Thanks for reply

I've solved my problems with ExcelCommandBarUtil.GetCommandBars() and I've generated command bars by code.

Can you indicate me best example (and method) to obtain ribbon on Excel 2013 and older versions.


bartcho
Coordinator
Mar 14, 2013 at 8:46 PM
Hi Bartcho,

The ribbon samples in Distribution\Samples\Ribbon should be a start. There are some more links here: http://exceldna.codeplex.com/wikipage?title=Ribbon%20Customization

-Govert