Excel DNA Function is not working/registering on Excel 2010&2013 64 bit.

554 views
Skip to first unread message

rajinit...@gmail.com

unread,
Oct 30, 2015, 11:50:34 AM10/30/15
to Excel-DNA
Hi Govert,

I'm registering the Excel-DNA function using Application.RegisterXLL(xllpath) method when Excel-Addin Startup Method is called.


For 32-bit Excel Version, I’m registering/using Test.DLF.AddIn.UDF-AddIn.xll : Excel DNA Functions are loaded and working fine in 32-bit.


For 64-bit Excel Version, I’m registering/using Test.DLF.AddIn.UDF-AddIn64.xll : Excel DNA Functions are not loaded.



For replicate the issue, you can get the complete working Visual Studio Solution from below shared link:


https://drive.google.com/file/d/0B1oQdCHsDWNRWVE5SkdnVnlHNHM/view?usp=sharing



Code Snippet:

 

private void ThisAddIn_Startup(object sender, System.EventArgs e)

        {

            try

            {

                Logger.InitializeLogFeature();

 

                Logger.Debug("Entered into The application");

 

                string xllpath = string.Empty;

 

                if (Environment.Is64BitProcess)

                {

                    Logger.Debug("Entered into get 64-bit Excel Addin for registering Function");

                    xllpath = AppDomain.CurrentDomain.BaseDirectory +

                          @"UDF\Test.DLF.AddIn.UDF-AddIn64.xll";

                }

                else

                {

                    Logger.Debug("Entered into get 32-bit Excel Addin for registering Function");

                    xllpath = AppDomain.CurrentDomain.BaseDirectory +

                            @"UDF\Test.DLF.AddIn.UDF-AddIn.xll";

                }

 

                Application.DefaultFilePath = AppDomain.CurrentDomain.BaseDirectory;

 

                bool isRegisterSuccess = Application.RegisterXLL(xllpath);

 

                Logger.Debug("Excel DNA xllpath " + xllpath);

 

                Logger.Debug("Excel DNA Register Is Success " + isRegisterSuccess);

            }

            catch (Exception ex)

            {

                Logger.Debug("Exception in Excel DNA Register" + ex.Message);

            }

        }



Kindly help me to solve this issue. 



Thanks,

Rajini


 

 

Working32bit_ExcelDNAFunction.png

Rajini K

unread,
Oct 30, 2015, 12:20:30 PM10/30/15
to Excel-DNA
Hi Govert,

In 64-bit Excel 2013, Excel DNA functions are loaded and Working Fine.


But Excel DNA functions are not loaded in 64-bit Excel 2010.


Could you please help me to solve this issue.

Govert van Drimmelen

unread,
Oct 30, 2015, 1:02:18 PM10/30/15
to exce...@googlegroups.com
Hi,

Are these different machines?
Perhaps there is some other dependency that is missing.

You can also check whether the simple 64-bit add-in in the Excel-DNA distribution works.

It sounds like a problem related to your machine or add-in, and not a general Excel-DNA problem.

-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at http://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages