I'm looking to be able to create an executable with py2exe or something similar that takes information from an excel sheet and returns a word file.
Since my coworkers are technically challenged, I need to create an executable that will take the work out of it for them.
Two questions here:
I have to be able to import something into the python script that represents DataNitro. What module represents DataNitro?
Is this legal? I won't be using a DataNitro license on every machine this exe will run on, besides my own, so if it's even possible, is this a bit shady?
Thank you.
P.S. If I'm not able to do this I will probably have to use xlrd,xlwt,etc.
The best way to give non-technical users access to DataNitro is to copy the VBA interface: hook the script up to an Excel button and have users press that button to run it. (There's no difference between running a Python script with DataNitro and running VBA code from the user's point of view.)
Each person using the script would need a DataNitro license.
There's no way to make DataNitro work with py2exe, unfortunately.
Source: I'm one of the DataNitro developers.
Related
I have written my python program with a Gui. Now i wanna use this tool in my company.
for this I need an .exe so others can use it.
I know my code. But now i have to compile my code to an .exe file with a third party tool like pyinstaller or pyuic.
How can I be sure this open source tools are safe to use in my company without risking any hackers infiltrated this tools?
Is there any official way or tool to make a usable windows program from a py file?
The "official way" to load PyInstaller is done via the pip command.
Open source does not mean everybody can edit the code that ist officialy distributed. If you would edit a copy of a printed law in your house does not mean that the law changes for everyone. Official commits are reviewed and checked against malicious edits.
Did you ever question other Python packages you loaded into your machine? They are distributed the same way.
Malicious actors will sometimes make clones of packages and publish them with a similar name in order to get lucky when people makea typo in the pip command. This is something you should always check.
I have been working with excel vba for some period of time related with automation. Now I am planning to upgrade to python. I did a little bit of research on how to implement automation using python. All I see people doing coding with PyCharm or Jupiter, to do an automation user has to have knowledge of python. What I want to know is how to create a tool or standalone application with python that does a repetitive task, calculation or report generation in excel. Where the end user doesn't have to worry about python or codes or learning new technology to accomplish the task.
I know this isn't technically and answer, and since I can't comment yet (too low rep), I'm going to point you to automate the boring stuff with python. I'm sure you can find your answer here plus some!
Here is my answer.
https://github.com/TaeYoon2/ExcelAutomation
This project is a sample excel automation program with python.
I used 'openpyxl' library.
welcome to stackoverflow. Here are a few resources that hopefully get you started on your journey to automating excel tasks with python then wrapping your project up for non-python users.
Python libraries that interface with excel (these are for you to write your excel automation projects)
openpyxl docs
pandas docs
pylightxl docs
more at http://www.python-excel.org/
Wrapping up your project for non-programmers
There are a few options here for your non-programmer users.
Have users run your python project on command line where you give them prompts to respond to for your automation (ie. input excel file name, automation task inputs etc). This is probably the simplest task on your end, but it does expect your users to know how to user command line.
Have users run your python project on command line but you create a graphical user interface (GUI) for them to ease the input field options. This requires some up front work on your end to wrap you input with a GUI of your choice; here are a few tkinter, pyqt.
Note that both of these options require your users to have python on their machine with the proper packages ready to go to execute your project. This can be a lot to ask for non-python users. Therefore finally you could use a packaging software like pyinstaller to wrap up your python project into an .exe
Hope that helps! Happy pythoning
So I am creating a program that takes input, processes the data, then puts it in Excel. In order to do this, I am using the "xlwt" package (and possibly xlrd). How do I then give this program to other people without making them download python and the packages associated with my program? I considered utilizing an online python interpreter and giving the username/password to my coworkers, but xlwt isn't on any of the ones I've tried, and they don't offer a way (that I can see) to download new packages.
You would have to compile the code into an exe file. The py2exe library can help you out with this
I am a non programmer with experience only in VBA. I took up the challenge to automate some daily tasks in my company, and chose Python 3.4 to do it (not sure if was the best option).
The scripts I need to do are rather simple. They just need to read values from .txt file, perform calculations, and write values in a .xls template.
I read some topics in stackoverflow and got concerned about these two topics:
Is there a feasible way to write data in excel (COM automation, Python 3 packages)?
Will I be able to compile Python 3.4 into an .exe file? Users can't install things in their Desktops.
I am able to do a script like this in VBA, but I need an executable file that can be used by everybody.
You can use the following tools:
XlsWriter https://xlsxwriter.readthedocs.org/
Or Use Py2Exe to convert to a python script to executable http://www.py2exe.org/
Or if your looking to use a '.csv' file, there are built in libraries for that, which are pretty straightforward
I have written a program. I don't know if it is important how it is written but you can find it here: http://pastebin.com/Z3ZvVPV8 Basically, it asks you to assign values to variables and will perform calculations depending on what variables you chose, and prints the answer.
I would like to know how I can make the program run in a window other than cmd (I am using Windows Vista 32bit). I don't need much at all in terms of GUI, just a window that is a bit more user friendly/easier to look at when they are using the program.
EDIT: To those suggesting using IDLE, while that would work for me, if others want to use the program they would have to download it, so I was hoping for a way for that not to happen.
Python comes with a sort of default GUI package TkInter you can use it.
Also there is a lot of other GUI packages available.
The Python standard library offers a lot of ways to implemt simple (but also rather complex) GUIs. I'd like to point you at the documentation of TK (tool kit for graphical interfaces) http://docs.python.org/library/tk.html where you will find also some useful example of use.
Py2Exe is a viable option if you really don't need a gui. This will make it run and look like a command prompt, but it will be an .exe file. Here is a quick quote from thier page: "py2exe is a Python Distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python installation."
Another alternative is to get Portable Python. Here is a quote from thier webpage: "Portable Python is a Python® programming language preconfigured to run directly from any USB storage device, enabling you to have, at any time, a portable programming environment. Just download it, extract to your portable storage device or hard drive and in 10 minutes you are ready to create your next Python® application." After packaging the portable python and your .py or .pyc file then create a .bat file that runs the portable python "Python-Portable.exe" with the correct command line parameters for loading your script. Be sure to use relative paths in the batch file in case they are running it from a flash drive, or something other than the same location as you.
NOTE: This is really not a good way to do this as thier download page states: "Installed size: based on selected packages, between 49MB and 480MB". Also be sure to read the the current Python Software Foundation License, as that is what Portable Python is released under, and it may or may not be legal to package it in a closed source project. I haven't really looked at the license myself to be able to tell you. If you are releasing it as open source, then there would not be an issue though. As a quick side note, if you need that .bat file to be a .exe file then you can use a .bat to .exe converter battoexe.com is one. This is really going the long way about doing the whole thing, but it is an option.
Sources:
Working with Python on and off for 7 years now, a lot that using a portable version on a flash drive, and also dealing with Batch files much longer.