I want to write python code to automate some excel procedures which I do on a daily basis and take me alot of time.
is there any package (or add-in in excel) I can use to run python code in excel?
Thanks!
I want to write python code to automate some excel procedures which I do on a daily basis and take me alot of time.
is there any package (or add-in in excel) I can use to run python code in excel?
Thanks!
xlwings will let you "Replace VBA macros with clean and powerful Python code."
A google search of 'python excel' turns up this:
There are also some modules that allow you to manipulate excel files with python scripts, such as http://xlsxwriter.readthedocs.io/, which may be an attractive alternative.
Hard to answer without more info on exactly what you wish to do, but the OpenPyXL module for Python might be a good place to start.
As for running python directly in excel, I believe XLWings would be an option for you but, myself, I would rather just write a python script outside of Excel that takes the excel file as input and does whatever operations are needed using OpenPyXL (or some other module).