error : The Ribbon/com add-in helper...could not be registered

Jul 16, 2014 at 9:46 AM
Hi everyone,

i created a ribbon wich worked for a while, but since yesterday i have an error report.
I reduced the code to have the simpliest thing, though it still doesn't work.
(i have attached the error message i get).

Here is my .cs file :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ExcelDna.Integration;
using ExcelDna.Integration.CustomUI;

 
namespace paul
{
    public class MyRibbon : ExcelRibbon
    {
        public void OnButtonPressed(IRibbonControl control)
        {
            MessageBox.Show("Hello from control ");
        }
    }
}
and here is the .dna :
<DnaLibrary Name="ClassLibrary6 Add-In" RuntimeVersion="v4.0">
  <ExternalLibrary Path="ClassLibrary6.dll" LoadFromBytes="true" Pack="true" />
  <Reference AssemblyPath="System.Windows.Forms.dll" />

  <CustomUI>
    <customUI xmlns='http://schemas.microsoft.com/office/2009/01/customui'>
      <ribbon>
        <tabs>
          <tab id='CustomTab' label='My 2010 Tab'>
            <group id='SampleGroup' label='Test on 2010'>
              <button id='Button2' label='Test 2' imageMso="GetExternalDataFromWeb" size='large' onAction='OnButtonPressed'/>
            </group >
          </tab>
        </tabs>

      </ribbon>
    </customUI>
  </CustomUI>
  
</DnaLibrary>
And as a reference i have added : excelDna, System.windows.Forms


I really do not understand, and did not find anything elsewhere.

Hope s-o can help.
Thanks for reading,

Have a good day !

Paul
Coordinator
Jul 17, 2014 at 8:02 AM
Hi Paul,

Your xml namespace is not right. It can either be the namespace for the Excel 2007 ribbon, which is xmlns='http://schemas.microsoft.com/office/2006/01/customui' or the one for the Excel 2010 ribbon, which is xmlns='http://schemas.microsoft.com/office/2009/07/customui'.

Your xml has neither of these, so is not loaded by Excel.

-Govert