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] 2 3 ... 41
1
Help and Support / Re: ImportError: No module named pyxll
« on: November 15, 2017, 05:54:06 PM »
Hi,

are you trying to import pyxll in Python code that isn't running in Excel? (ie running tests or scripts from Eclipse?) If so, you just need to install the stubs pyxll package that comes in the download. If you look in the zip file you should see a .whl file, which you can install with pip, eg:

pip install <pyxll wheel file>

If it's a problem importing when running in Excel, please set your logging level to debug in pyxll.cfg and send me your log file and I'll take a look at it for you.

Best regards,
Tony

2
Help and Support / Re: pyxll_utils.extension loader
« on: November 15, 2017, 05:31:40 PM »
Hi Daryl,

in order for setuptools to be able to see your extension, the package needs to be installed (being on the python path isn't quite enough).

To install a package you run setup.py with the install command: "python setup.py install"

Alternatively, you can install the package in 'development mode', which just puts a link in your site-packages folder to tell setuptools to look in your development source folder: "python setup.py develop"

I can see this isn't very clear from the pyxll_utils docs, so I will ask for them to be updated.

Best regards,
Tony

3
Hi,

unfortunately I've not been able to reproduce your problem. I have tried creating a dataframe using the strings from your original post and they appear correctly in Excel. I have also tried functions taking a unicode string and returning the same string to Excel without problems.

I've attached my tests so you can see what I've tried. Can you try them and see if they work for you please?

I have included files for both Python 2 and Python 3. In both cases the Python modules are encoded in utf-8 (see the first line of the modules). For the dataframe return type I am using the pyxll_utils.pandastypes module from here: https://github.com/pyxll/pyxll-utils.

I have tested with PyXLL 3.3.1, Python 2.7 and 3.5.

Best regards,
Tony

4
Hi,

I've not come across this problem before so I will have to look into it and get back to you.

Kind regards,
Tony

5
Help and Support / Re: triggering run of VBA macro
« on: October 22, 2017, 09:15:54 PM »
Hi,

yes, you can use the Application.Run function (part of the Excel COM api) in the same way as you can from VBA. Use pyxll.xl_app to get the Excel.Application object (https://www.pyxll.com/docs/api/utils.html#pyxll.xl_app).

If you want to do this from a worksheet function (using xl_func) you will probably need to use pyxll.async_call to call it after the Excel calculation has completed (https://www.pyxll.com/docs/api/utils.html#async-call).

I hope this helps,
Tony

6
Help and Support / Re: Error while loading script with pandas
« on: October 20, 2017, 12:15:30 PM »
Yes I would expect it to fail in both, unless for some reason the ordering of the final python path was different when using pyxll (it shouldn't be).

I'll have to have a play around and see if I can reproduce this. I've never seen a problem with linking develop packages like this, but possibly it's some combination of the pyxll_utils extension loader and script I've just not come across before.

I'll let you know what I find.

cheers,
Tony

7
Help and Support / Re: Error while loading script with pandas
« on: October 20, 2017, 11:41:53 AM »
Hi,

there should be no difference in installing modules in develop mode. That particular errors looks more like an issue with ctypes than anything else. I wonder if it's finding another _ctypes package somewhere else on the pythonpath? Could it be you have one copied somewhere in your dev environment that would only be on the path when you have your module installed with the develop option?

You can now completely disable the pyxll import hook by setting "deep_reload_disable=1" in the PYXLL section of your pyxll.cfg file. It doesn't look like your problem is caused by this, but it would be worth checking.

The console window flashing up will be if something somewhere is using subprocess or multiprocessing, or otherwise starting a child python process. When you configure the executable in your pyxll.cfg change python.exe to pythonw.exe for the windowless version and that should stop that problem.

Best regards,
Tony

8
I'm marking this as solved now as I believe everything should be resolved in the latest release, but if you're still having problems please let me know.

Best regards,
Tony

9
Help and Support / Re: Error while loading script with pandas
« on: October 20, 2017, 10:42:07 AM »
Hi,

well, this is embarrassing! There was an error with the deployment of 3.3.0 and this change never actually got included, despite being in the previous beta :(

I'm very sorry for the inconvenience. I've just released a new version (3.3.1), which this time really does include the fix for this. I've tested it for the modules you've listed with the latest pandas and pytest to confirm it really is working now.

I notice you're using the pyxll_utils shortcuts and array resize features. Did you know that both of these things are now supported by PyXLL itself? They haven't been removed from pyxll_utils to avoid breaking peoples code, but you shouldn't really need them anymore.

These are the relevant pages in the docs:
https://www.pyxll.com/docs/userguide/macros.html#keyboard-shortcuts
https://www.pyxll.com/docs/userguide/udfs.html#resizing-array-formulas

Please let me know once you've had a chance to get the latest 3.3.1 release, and whether it fixes your problem or not.

Kind regards,
Tony

10
Help and Support / Re: Pxyll Functions not appearing in Excel
« on: October 11, 2017, 03:10:29 PM »
Hi,

hmm yes that does sound like there could be a problem elsewhere. It sounds like Excel is loading the pyxll.xll file from somewhere else - which could happen if you initially installed it in one location and then tried to move it somewhere else, as Excel still remembers the old location.

The easiest way to check is to go into File -> Options -> AddIns in Excel and check the full path it is using for the PyXLL pyxll.xll file. If that is not where your config file is, that'll be the problem.

If that is the problem, you will need to uninstall the old one by going to "Manage Excel Add-Ins" in the Add-Ins page you were just on and un-check PyXLL. Then close Excel and delete or rename the file Excel was using. Then restart Excel and add the one you want it to use. Deleting or renaming the old file is the easiest way to ensure that Excel doesn't pick it up again as it has a habit of remembering!

Please let me know if this solves your problem or not.

Kind regards,
Tony

11
Help and Support / Re: Pxyll Functions not appearing in Excel
« on: October 11, 2017, 09:38:15 AM »
Hi,

that all looks correct... could you set the log verbosity to "debug" and send the log file please?

Best regards,
Tony

12
Hi,

since this question was first asked, automatic array resizing has been added to PyXLL. See the following links for more information:

https://www.pyxll.com/docs/whatsnew.html#id5
https://www.pyxll.com/docs/userguide/udfs.html#resizing-array-formulas

Best regards,
Tony

13
Hi Alfredo,

I've re-visited how async_call works in the upcoming 3.3 release so that now async_call runs the callback in an Excel macro context. This means that now your retry logic should no longer be necessary, and calling back into Excel with COM from an async callback should behave more reliably.

If you're interested you can download the beta release from https://beta.pyxll.com (username pyxll, password pyxll).

Best regards,
Tony

14
Help and Support / Re: Error while loading script with pandas
« on: September 08, 2017, 10:07:40 AM »
Hi,

sorry it's been a while, but this issue has been fixed for the next release (3.3). You can download a beta version from https://beta.pyxll.com (username pyxll, password pyxll). You can see the list of changes (including this fix) here http://beta.pyxll.com/changelog.html.

If you are able to try out the beta please let me know how you get on :)

Best regards,
Tony

15
Help and Support / Re: Assign Shortcut to PageUp Key
« on: September 08, 2017, 10:05:39 AM »
Sorry that I've not updated you in a while about this, but a beta release of PyXLL 3.3 is now available from https://beta.pyxll.com (username pyxll, password pyxll) that allows you to assign a shortcut to Ctrl/Alt/Shift+PageUp.

See http://beta.pyxll.com/docs/userguide/macros.html#shortcuts for details.

The final 3.3 release will be released in the next few weeks, but in the meantime please do try out the beta and if you have any issues let me know.

Kind regards,
Tony

Pages: [1] 2 3 ... 41