ExcelDna.xll can't be loaded (Error in Excel)

795 views
Skip to first unread message

Stefan Litzel

unread,
Nov 25, 2020, 8:12:28 AM11/25/20
to Excel-DNA
Hi everyone,

I created a small Excel Add-in to get started with Excel-Dna. I really like it so far! Unfortunately when trying to load it on another corporate computer, the packed xll add-in fails to load with the error message 
"The file format and extension of "NameOfAddin.xll" don't match. The file could be corrupted or unsafe". 
To check if there was an issue with my Add-in or my packing, I also tried it with the ExcelDna.xll Add-in that was included in the distribution. It also failed to load on that corporate computer with the same error message. I already checked if the installed Excel Version on that corporate computer might be 64bit, but it is indeed the (default) 32bit version of Excel. Does anybody have an idea what I could do?

Best regards and many thanks
Stefan

Govert van Drimmelen

unread,
Nov 25, 2020, 8:51:40 AM11/25/20
to exce...@googlegroups.com

Hi Stefan,

 

You seem to be in the same position as this discussion: https://groups.google.com/g/exceldna/c/Ybhzi82onE8

 

I can only ask the same steps as I asked for there:

  • Can you confirm that you get the error when trying it via File -> Open in Excel, instead of adding the add-in to the add-ins list, or double-clicking or similar.
  • Can you confirm that the 64-bit version gives the same error on that machine?
  • Can you confirm that VBA is installed and runs - just press Alt+F11 and check that the VBA IDE opens.
  • Is this a virtualised environment – the other discussion seemed to be under a Citrix remote environment.

 

Otherwise I would love to understand what is happening, but (apart from the 32-bit / 64-bit cases that we understand) I have not had many such reports.

As in the other discussion, the next step would be to confirm that the sample native code add-in from the Excel SDK also presents this problem.

At that point it’s clearly not an Excel-DNA problem, and we can figure out how to escalate to their IT or Microsoft.

 

-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 view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/97b63b8c-7453-479a-a0dc-d67771a5b617n%40googlegroups.com.

Stefan Litzel

unread,
Nov 25, 2020, 12:06:18 PM11/25/20
to Excel-DNA
Hi Govert,

First of all thank you very much for your help! We've built some nice API's and engines on the server side. Our business analysts love to use Excel for their analysis. Therefore I would really like to provide them an Add-in in order to access those API's directly from Excel while also providing some other "quality of life" UDF functions. Excel-DNA sounds like a promising solution for that (I really would like to avoid creating something in VBA). Now we just have to get it working on the corporate client computers :)

Find below the answers to your questions:

Q: Can you confirm that you get the error when trying it via File -> Open in Excel, instead of adding the add-in to the add-ins list, or double-clicking or similar.
A: I just tried that. I receive the same error message.

Q:  Can you confirm that the 64-bit version gives the same error on that machine?
A: I tried opening the file ExcelDna64.xll and I receive the same error message.

Q:  Can you confirm that VBA is installed and runs - just press Alt+F11 and check that the VBA IDE opens.
A: VBA works. VBA code runs without problems. 

Q:  Is this a virtualised environment – the other discussion seemed to be under a Citrix remote environment.
A: Actually yes! My development happens on my corporate notebook, but the business analysts that would be using the add-in and where the error message pops up are all working on Citrix sessions. 

Govert van Drimmelen

unread,
Nov 25, 2020, 1:11:34 PM11/25/20
to exce...@googlegroups.com

Hi Stefan,

 

I’ve built a 32-bit version of the Generic.xll example from the Excel SDK.

You can get it here and check whether it works in your Citrix environment: https://1drv.ms/u/s!AoAzqktyRNqYj1a7hbwiUVBpcViC?e=1v1geU

 

Are you able to install a debugger or Visual Studio on such a machine?

That might let us attach to the process and see any module load errors.

This can also be done with something like Process Monitor: https://docs.microsoft.com/en-us/sysinternals/downloads/procmon

 

Maybe someone how deal with the Citrix stuff could also help?

Stefan Litzel

unread,
Nov 26, 2020, 4:56:15 PM11/26/20
to Excel-DNA
Hi Govert, Thanks for building that! Unfortunately I can't seem to download it, as this was blocked by some corporate policy (certificate error). Could you upload it somewhere else?

I don't know how it was built, but I tried running pyxll and I received the same error message. 

I am also trying to get my hands on a different kind of citrix session that my company is offering that has less restriction to check if it works there. 


Best regards and many thanks
Stefan

Stefan Litzel

unread,
Nov 26, 2020, 5:17:07 PM11/26/20
to Excel-DNA
I just tested it on the other citrix session and it works there. So I suspect that the reason might be that those "standard" citrix sessions are highly restricted. 
I also found out, that it is not possible at all to execute any executable that is not saved in a specific path (and user has no write access to those paths). I am not too familiar with those .xll files, but I suppose that it also blocks the packed dll of the xll file. 

Govert van Drimmelen

unread,
Nov 27, 2020, 1:55:02 AM11/27/20
to exce...@googlegroups.com

Hi Stefan,

 

Thank you for reporting your further findings.

 

It sounds like your Citrix environment is blocking all .dlls from being loaded (outside the designated directories, as you say).

The .xll file itself is actually just a .dll file, and is loaded by Excel as a .dll file. We’re never even coming near the Excel-DNA parts packed inside.

 

I guess you’ll need some help from the admin side to get that Excel add-in loaded.

Reply all
Reply to author
Forward
0 new messages