I am trying to integrate xlwings with an excel spreadsheet that we use on our network drive. However, I do not want to install Python, Xlwings, or any other modules on any computer except for the developers. In addition, I would like to use UDFs only, we do not have an interest in using Macros. I read here (https://www.reddit.com/r/Python/comments/22i4a1/xlwings_the_easiest_way_to_deploy_your_python/) that there is a way to freeze your python script which would prevent the need for all users to have Python installed. As a result, I used cx_Freeze to freeze my script. Assume I have these files in the "I" drive and that there are no other files: test.xlsm, test.py, test.exe, Dir (folder containing dll and pyd files generated by cx_Freeze. I am using Python 2.7 and xlwings 0.7.2. Any help would be greatly appreciated!
Related
I am trying to figure out how to use Python-based functions in excel. I came across Pyxll which can make Python add-ins instead of using VBA. But Pyxll is not free after their 30-day trial.
I also came across xlwings which worked fine and served the purpose of adding udfs in excel, the problem is--- it is not very user-friendly. I have to put the excel file in the same folder as the python file plus, they should also have the same names with different extensions. Or I may use the xlwings quickstart command to do that.
This means I have to create such folders everytime I wish to include my python based functions in a new excel project file and copy paste the functions from the previous python files to the newly created quickstart files.
I was wondering if there is any way to use only one python file to import user-defined functions using xlwings or perhaps a different library/module which is free to use and does that?
(PS: According to the xlwings documentation, we can point to a udf module under the xlwings tab in excel but even after many attempts I am not able to make it work )
I am using Python to create a program for university, however, I included the PyMySQL library as a reference and have a .Ico file for the Icon of the program. Is there anything I can use to compile the multiple .py files and libraries with the Icon to a format that won't require the user to install PyMySQL first and that will package everything together.
For those interested; I have tried PyInstaller and another package compiler, yet not had any luck as some didn't let me compile multiple packages along with the library and Icon. Either that or I'm not doing it correctly?
PS. I'm quite new to python and I know Python compiled files are .pyc but I also know you can make them executables so they can't be editted etc.
Thank you.
I want to create a Python script to do some simple Excel work, i.e reading data from Excel files.
I do not wish to convert the files to .csv files.
I am restricted from installing any libraries for Python on my machine.
Is there a way to get hold of an excel library for python which I do not have to install onto my machine?
So I know that xlwings can import User Defined Functions to excel from Python and I have no problems when I do that. I also know that xlwings can run macros based on a frozen (executable) python file which removes the requirement for a user to have python installed. My question is if you can merge the two so that User Defined Functions can be run using only a frozen (executable) python file as its source? If so please elaborate on the settings required to do so since I have not successfully done so. Thank you in advance for your time!
I am writing code for a number of other people, none of whom are particularly computer savvy. I installed python 2.7 for all of them, but I really do not want to have to install anything else.
To get around installing every library that I wanted to use, I've simply been including the library source code in the same folder as my project source code. Python automatically searches for the necessary files in the working directory, and all goes well.
The problem came when I tried to install pandas. Pandas is a library that includes .pyx and .c files that are compiled on install. I cannot just include these files in with my source code, because they are not in the proper form.
How can I either compile these on launch or pre-compile them for ease of transfer? (And the kicker, I need a solution that works cross platform--I work on Windows 7, my colleagues work on OSX.)
Thank you in advance.