Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Tony

Pages: 1 ... 26 27 [28] 29 30 ... 44
406
Help and Support / Re: Help in xlcAlert (character encoding)
« on: May 30, 2014, 09:53:02 AM »
Hi,

to install the new version you need to uninstall the old one first. Uncheck the old addin in your Excel options and then completely close Excel. Restart it and check that PyXLL is no longer loaded, and then load the new version.

If you've already done that and have 2.2.0 installed ok, what is not working? Is the addin loading at all? (do you see the pop-up dialog? are the menu items added?) Or is it that it's not pickingup your code? If you have the addin in another folder other than the previous version have you updated the config file? PyXLL will look for the config file in the same folder as the xll file, so it won't find your previous config unless it's in the correct place.

Best regards,
Tony

407
Help and Support / Re: RE: Excel crash
« on: May 30, 2014, 09:07:41 AM »
Hi,

I think I've found the problem now... it seems to be a particular problem with how the 64 bit version of Excel handles functions that take arrays of float and also return arrays of floats. Basically what's happening is that for some reason Excel isn't passing the array to the function, and the pyxll code that converts that array to a python list isn't handling that case (as it should never happen).

Anyway, for now the way to work around this particular problem is to change the return type to 'var'. You can still return a numpy array and it will be returned to Excel as a range of values and it will avoid this problem.

Thanks for reporting this and helping me track it down. I'll work on a fix for the next release.

Best regards,
Tony


408
Help and Support / Re: RE: Excel crash
« on: May 29, 2014, 02:22:14 PM »
Hi,

is that 64 bit or 32 bit? Could you also confirm exactly which version of pyxll you're using? If you go to Addins->PyXLL->About PyXLL it will tell the version number. You can see what version of excel you're using (32/64) by going to File->Help and it's displayed on the right hand side under 'about microsoft excel'.

If the pyxll version is before 2.1.0 and you're using 64 bit excel you should try updating to the latest version of pyxll.

Best regards,
Tony

409
Help and Support / Re: RE: Excel crash
« on: May 25, 2014, 02:43:30 PM »
Hi,

no, it's not normal for Excel to crash due to a bug in the python code... What versions of Excel, python and numpy are you using?

thanks,
Tony

410
Help and Support / Re: RE: Parallels and installation
« on: May 14, 2014, 10:09:45 AM »
Hi Dane,

if you install the right python version matching the version of pyxll you've downloaded and use the python installer to install it, selecting the 'install for all users' option (not strictly necessary, but try it if the first install didn't work) then pyxll will be able to find the dll with no problems. It's only if the python dll hasn't been installed in the windows path for some reason (eg if using portable python, or some other python install that doesn't install it as the default system python) that you have to mess around setting the system PATH environment variable.

You could also try Canopy, which has PyXLL available for download direct from its package manager:
https://www.enthought.com/products/canopy/

Removing an addin from Excel can be a bit tricky as even if you deselect the addin then Excel remembers it but doesn't activate it. You can use the following python script to completely remove all reference of PyXLL from Excel:
https://github.com/pyxll/pyxll-examples/blob/master/scripts/uninstall.py

Best regards,
Tony

411
Hi Tyler,

looking at the function you posted earlier, it doesn't return anything - which might explain why you're just getting zero in Excel. Some languages just return the last value assigned, but in python you have to use the 'return' keyword to return a value from a function, otherwise the default return value of None is used.

If the function isn't working you can check the log file for any exceptions, or you can try calling the function directly in canopy to test it out before trying it in Excel.

I hope this helps,

Tony

412
Help and Support / Re: Deleting PyXLL custom submenu
« on: May 07, 2014, 09:08:37 AM »
Great! thanks for letting me know.

Best regards,
Tony

413
Help and Support / Re: Deleting PyXLL custom submenu
« on: May 06, 2014, 08:48:48 AM »
Hi Kris,

thanks for the clear explanation and example - that really helped figure out what the problem was.

It should really be fixed now! You can download the beta version again to try it out.

Best regards,
Tony

414
Help and Support / Re: Help in xlcAlert (character encoding)
« on: May 02, 2014, 09:53:16 AM »
Hi,

this should be fixed now in the current beta release, which you can download from here:
http://beta.pyxll.com/download.html

All those functions previously mentioned can now take unicode strings correctly.

Best regards,
Tony

415
Help and Support / Re: Deleting PyXLL custom submenu
« on: May 01, 2014, 10:24:02 PM »
Hi Kris,

this should be fixed now in the current beta release, which you can download from here:
http://beta.pyxll.com/download.html

Best regards,
Tony

416
Help and Support / Re: Deleting PyXLL custom submenu
« on: May 01, 2014, 09:39:43 AM »
Hi Kris,

it has to be done at the C API level I think - I don't know of a way to do it via VBA/COM. You could do it using ctypes, but it's a bit tricky and is better done in pyxll. I can get a patch release done with this fix in the next day or two if that would be soon enough?

Best regards,
Tony

417
Help and Support / Re: Deleting PyXLL custom submenu
« on: April 30, 2014, 10:08:09 AM »
Hi Kris,

this looks like a problem when the menus are removed when rebinding. The main menus are removed from excel, but the submenus aren't explicitly removed first which is what I suspect is causing the problem you're seeing.

I'll log an issue and get this fixed for the next release.

Best regards,
Tony

418
Hi Tyler,

have you added your new module to the config file? It needs to go in the modules list in the PYXLL section:
https://www.pyxll.com/docs/quickstart.html#configuration

If you've done that, take a look at the log file and there should be something in there. If your module can't be imported for some reason that would explain why the function's not appearing, and the log file should help you figure out why. You can set the log level to debug (verbosity = debug in the LOG section of the config file) to get pyxll to log the functions it finds.

Canopy has a utility function to help you find and edit the pyxll config file, see https://support.enthought.com/entries/26196665-Installing-and-configuring-PyXLL-with-Enthought-Canopy for instructions about that.

Best regards,
Tony

419
Help and Support / Re: Problem with long strings as input
« on: April 15, 2014, 01:51:55 PM »
Hi,

this is a limitation of Excel. When you pass it as a var it's actually converted into a unicode string, which has a different max length to a plain ascii string. It's because Excel uses the first char as the length of the string, and so for single byte chars the max string length is 255.

Unfortunately it's Excel that can't construct the argument to call the function with, and so it never actually calls the function and that's why you don't see any errors in the pyxll log (as pyxll is never called in this case).

You should find that if you use unicode instead of string you can also pass a longer string.

Best regards,
Tony

420
Help and Support / Re: Problem with XL 2013 and xl_app
« on: March 31, 2014, 08:03:14 AM »
Hi,

the Excel window isn't created until after the PyXLL addin is loaded, so calling xl_app during module import will fail. See this example for how to wait until the window's available:

https://github.com/pyxll/pyxll-examples/blob/master/shortcuts/shortcuts.py

You'll see that the xl_shortcut decorator can be used in the module and called on import, but it waits to try to get the application object until after the window has finished opening. Even in earlier versions of Excel you will find that trying to get the application immediately on start up won't reliably work (it may be in your case because of some lucky timing accident, but more often than not it will fail).

Best regards,
Tony

Pages: 1 ... 26 27 [28] 29 30 ... 44