Author
Topic: Recent Error: Not a valid addin (Read 12540 times)

Recently, I have been unable to open the pyxll.xll addin - Excel 2007 says it is of the type specified by the extension. When I continue to open the addin, it appears that the binary file is opened in Excel as if it were a text file.

When opening in Excel 2003, Excel complains that it is not a valid addin. I have tried to clear out my addins folder and downloading a new copy, though this also did not work. Any ideas what may be going on?

yes, that happens if Excel can't load any of the dll dependencies. You need to make sure you have the correct version of python installed to match the version of PyXLL you've downloaded. python2x.dll must be in your path (by default it's in C:\Windows\System32). You can also put it in the same directory as your addin if you don't want it in your path for any reason.

that should be fine, as long as you have downloaded the version of PyXLL built for python 2.6. PyXLL works with the Enthought distribution. You should check that the python dll is in your path though. You could also try copying it to the same folder you have the pyxll addin.

You could use a tool like depends.exe (http://www.dependencywalker.com) to see if there are any other dll dependencies missing. A couple of dlls may be missing, xlcall32.dll and ieshims.dll. These will be provided by Excel, so it doesn't matter they're not found. If there is anything else missing though, that will probably be the problem.

yes, dlls in windows are a pain, especially with the side-by-side assemblies.

Did you manage to find the missing dll using dependency walker? Another possibility is if you can load python normally you can look at the loaded dlls to find where it finds the dll Excel can't find. You can use the sysinternals process explorer to do that (www.sysinternals.com or live.sysinternals.com/procexp.exe).

In almost all cases it's the microsoft runtime it can't find - msvrt90.dll.

I spent other time over this issue but i cannot find nothing.I've tryed to analyze dependencies with PE Explorer Dependency scanner, dependency walker and process explorer.Nothing appears strange to me ( or probably i don't know where to find solution)

I'm using excel 2003 in 32bit, but this issue appears in 2010All environment is stand alone in a USB key with portable python 2.7

But at each reload of excel it cannot find a valid addins.If you can install examples into a portable python env probably you can see the same problem.

could you try something for me please? Could you run Excel 2010 without loading PyXLL and have a look at what dlls are loaded using procexp.exe from sysinternals? (http://live.sysinternals.com/procexp.exe).

I'm particularly interested to see where it's loading msvcr90.dll from. In process explorer, click View->Lower Pane View->DLLs to show the dlls loaded by a process. Select EXCEL.EXE and then find msvcr90.dll from the list below and double click it. That should bring up the properties and will tell you where it's loaded from.

For me, it is here:C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcr90.dll

This dll is also used by Python. In previous version of Excel, Excel itself used a different runtime dll but with Excel 2010 it happens to be the same version that python requires.

You could use process explorer to see what dlls Excel 2003 has loaded when using PyXLL as well, just to double check it is picking up the python dlls you expect it to.

I have installed portable python and removed all previously installed versions of python 2.7 to try and reproduce this problem. I set the following environment variables:

After doing that I have not been able to find any problems using PyXLL with portable python with Excel 2010 I'm afraid, so there must be something different happening in your case that we need to identify

are you sure Excel 2010 is using msvcr80.dll? What version of 2010 are you using? You can find the version number by going to File->Help and it's on the right hand side, e.g. "14.0.6112.5000 (32-bit)".