Office developer documentation, downloads, tools | Office 365, Apps for Office, Apps for SharePoint

 none
“addin.XLL is in a different format” issue, cannot open the xll I created by myself

    Dotaz


  • I wrote a very simple xll file in VC++ 2010, and the Excel I am using is Excel 2007. The library contains only one function:

    extern "C" LPXLOPER12 WINAPI tsMkErr() {
        static XLOPER12 x;
        x.xltype = xltypeErr;
        x.val.err = xlerrNull;
        return &x;
    }

    and the necessary xlAutoOpen function. I compiled and dll file, change the name to xll, and double click it to open in Excel. Everything works just as I expected.

    However, if I am trying to open this file on another PC, the Excel just keeps telling me that:

    The file you are trying to open, '.xll', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?

    When I click yes, garbage pops out.

    I also tried to load it via Add-in Manager. In this case I can open the file, but cannot find my function tsMkErr().

    I would be grateful to all suggestions ...

    ... I am going to publish my tool this week ... now I just realized it only works on my PC ... please help ... T_T

    7. února 2013 20:59

Odpovědi

  • Hi,

    Perhaps your add-in is built as a 32-bit library which you are trying to open in the 64-bit version of Excel, or the other way around. You'll need separate versions of the .xll for 32-bit and 64-bit Excel. 

    If this is not the issue, you should check that library is statically linking the C/C++ Runtime, or you are distributing the right version of the C/C++ Runtime files to the other machine.

    Regards,

    Govert

    Excel-DNA - Free and easy .NET for Excel

    10. února 2013 14:49

Všechny reakce

  • Hi,

    Perhaps your add-in is built as a 32-bit library which you are trying to open in the 64-bit version of Excel, or the other way around. You'll need separate versions of the .xll for 32-bit and 64-bit Excel. 

    If this is not the issue, you should check that library is statically linking the C/C++ Runtime, or you are distributing the right version of the C/C++ Runtime files to the other machine.

    Regards,

    Govert

    Excel-DNA - Free and easy .NET for Excel

    10. února 2013 14:49
  • Hi yzhao0527,

    Welcome to the MSDN forum.

    I temporarily marked the reply as answer and you can unmark it if it provides no help.

    Thanks for your understanding and have a nice day.


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    21. února 2013 8:31
    Moderátor
Office developer documentation, downloads, tools | Office 365, Apps for Office, Apps for SharePoint