Author Topic: EXCEL 2007 crashes  (Read 5422 times)

arvanitis

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
EXCEL 2007 crashes
« on: May 30, 2011, 10:26:50 AM »
Hello to everyone
I have recently downloaded and istalled Pyxll py26 1.2.0 for python 2.6
I have followed the istallation instructions made the appropriate changes to python paths in config file
When I try to add the addin the pyxll.xll in excel 2007 addins by excel crashes
I have tried the same for excel 2003 and works fine???

I would appreciate your help

Tnks in advance

christos

Tony

  • Administrator
  • Hero Member
  • *****
  • Posts: 541
  • Karma: +12/-0
    • View Profile
Re: EXCEL 2007 crashes
« Reply #1 on: May 30, 2011, 11:25:36 AM »
Hi Christos,

when you say Excel crashes, do you mean that Excel actually dies or is it that the addin won't load?

Regards,
Tony

arvanitis

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: EXCEL 2007 crashes
« Reply #2 on: May 30, 2011, 01:04:37 PM »
hi Tony

When I load the addin from addins seens that this is running for ever ....and when after a long time I hit on excel then it crashes ....
I have tried to see the addins security options everything in unblocked.....
what do you thing?

regards

christos

Tony

  • Administrator
  • Hero Member
  • *****
  • Posts: 541
  • Karma: +12/-0
    • View Profile
Re: EXCEL 2007 crashes
« Reply #3 on: May 30, 2011, 01:14:52 PM »
Hi,

hmmm, I've not heard of anyone having this problem before :( What python distribution and exact version are you using? if it's not one of the ones I've tested I'll download it to try to reproduce your problem.

Also, do you have any other addins loaded that use python? Eg a Python COM addin?

Tony

arvanitis

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: EXCEL 2007 crashes
« Reply #4 on: May 30, 2011, 01:52:05 PM »
I am using python 2.6 from python(x,y) [python 2.6 packed inside]
I have tried to use Expy but i have unistaled and not using it anymore
Because of this issue i have tried also Pyinex ....but not sure if this could create the issue. I have installed both pyinex and pyxll on another machine for excel 2003 and both work fine.....

regards

christos

Tony

  • Administrator
  • Hero Member
  • *****
  • Posts: 541
  • Karma: +12/-0
    • View Profile
Re: EXCEL 2007 crashes
« Reply #5 on: May 30, 2011, 02:40:15 PM »
Hi,

I meant are you using activestate's python or enthought's or have you built it yourself or what? What is the minor release, ie 2.6.x?

If you have pyinex installed as well it could cause an issue, I've not tried it though... If pyinex is not initializing threading and therefore not acquiring the GIL before calling python functions that would explain the hang. Please can you try uninstalling pyinex for Excel 2007 and see if that changes anything.

thanks,
Tony

arvanitis

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: EXCEL 2007 crashes
« Reply #6 on: May 30, 2011, 04:21:17 PM »
hi,

Its enthought's python version 2.6.6 Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32

I have removed pyinex xll from excel and tried again ....still have the same issue ....strange!!
tnks

Tony

  • Administrator
  • Hero Member
  • *****
  • Posts: 541
  • Karma: +12/-0
    • View Profile
Re: EXCEL 2007 crashes
« Reply #7 on: May 30, 2011, 08:58:43 PM »
Hi,

ah, there was a compatibity problem with enthought's 6.3 release (which is the one you're using, I think). I've not seen that particular problem cause Excel to hang or crash though... But I do know that there are problems using it with Excel 2007 (it's fine with Excel 2003 and 2010).

I spoke to Enthought about the problem, and they have fixed it in their latest release (7.0), which is based on Python 2.7. Is it possible you could try that to see if that works for you?

Regards,
Tony

arvanitis

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: EXCEL 2007 crashes
« Reply #8 on: May 31, 2011, 08:46:33 AM »
hi tony let me give it a try....
But i want to keep my old Python(x,y) [python 2.6.6] as well because some of the modules I need dont work with python 2.7 and I have done some work there which i want to keep.

So if i install edp 7.0 from enthought with python 2.7 is it possible to keep also python 2.6.6 and simply point to python 2.7 directory from the config file of PYXLL or i will have troubles???

tnks

christos

Tony

  • Administrator
  • Hero Member
  • *****
  • Posts: 541
  • Karma: +12/-0
    • View Profile
Re: EXCEL 2007 crashes
« Reply #9 on: May 31, 2011, 09:06:56 AM »
Hi Christos,

Python 2.7 and 2.6 will install to different folders so you can have them both installed at the same time. You'll need to download the Python 2.7 version of PyXLL as well, and that will pick up the correct version automatically.

cheers,
Tony

arvanitis

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: EXCEL 2007 crashes
« Reply #10 on: May 31, 2011, 12:02:26 PM »
hi tony,

I have installed  python 2.7 edp 7.0 from enthought and tried puxll for this python version. At this point when i load the pyxll.xll it is loaded ok but from there nothing happens ...I dont see the starting spash screen I have no log and the examples sheet does not work either returns #VALUE! or #NAME!
tnks

christos

Tony

  • Administrator
  • Hero Member
  • *****
  • Posts: 541
  • Karma: +12/-0
    • View Profile
Re: EXCEL 2007 crashes
« Reply #11 on: May 31, 2011, 07:16:08 PM »
Hi Christos,

that's very strange... you should always get an error message either from Excel if it can't load PyXLL, or from PyXLL if it can't initialize correctly. For it just to not load without any warning or error at all isn't something I've come across before.

Can you double check that you have un-loaded the previous version of PyXLL and try again? You should un-select it from the addins menu and then exit Excel completely. Check the task manager to make sure no rouge Excel.exe processes are left running. Then when you open Excel again check that pyxll isn't checked in the list of loaded addins, and then browse for the new 2.7 version of pyxll.xll.

When you uncheck an addin it doesn't actually get unloaded completely until you restart Excel - so perhaps you are still seeing a problem with the old 2.6 version.

Excel will sometimes disable addins that have caused problems in the past. It's possible that it has disabled pyxll and now it's refusing to load it even though it's actually a different version. You should be able to find Excel's list of disabled addins in the registry under one of these paths using regedit.exe:

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\12.0

According to http://support.microsoft.com/kb/919196 it's safe to remove these completely, but you might want to take a copy first. If you can remove all references to pyxll from there, restart Excel and then re-add PyXLL that should ensure that you really are loading the correct addin and Excel isn't disabling it.

Do you have another .xll addins that you use? Do they work correctly in your install of Excel 2007?

Sorry not to be able to give you a concrete solution to fix this at the moment. Please report back with how you get on and I hope we will be able to get this working for you soon.

Regards,
Tony