Reputation: 171
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!
Upvotes: 1
Views: 5405
Reputation: 274
xlwings will let you "Replace VBA macros with clean and powerful Python code."
See - https://docs.xlwings.org/en/stable/
Upvotes: 3
Reputation: 180
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).
Upvotes: 0
Reputation: 2223
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.
Upvotes: 0