Automate Excel with Python and Turn Repetitive Work into One Click
The xlwings Lite add-in runs Python inside Excel, so a weekly routine of combining files, cleaning data and creating the same documents can become one button. There is no local Python to install, the code is saved inside the workbook, and a colleague with the same add-in can run it.
From raw data to a dashboard
The first example starts with a plain sheet of raw sales data. One button turns it into an interactive dashboard in about two seconds: KPI cards, a monthly trend, a heatmap and a sunburst chart you can filter and hover over, saved as one file you can send to a manager.

Excel stays the place where the data lives and where you read it. Python does the repetitive processing and produces the finished output.
From messy files to finished documents
The bigger time savings usually come from messy multi-step processes. In the second example, four sales files with slightly inconsistent data need current exchange rates before commissions can be calculated, and then every distributor needs a Word statement with the right names and numbers.
One Excel button handles the whole chain:
- Combine the source sales files into one dataset.
- Clean and prepare the data.
- Pull live exchange rates from the internet.
- Run the commission calculations.
- Create the Word documents in bulk from the Excel values.
- Save an interactive chart for presenting the results.
Done by hand, that is half a day of copy and paste. As a script, it finishes in a few seconds.

If bulk documents are your main problem, my guide on creating Word documents from Excel data covers that step on its own.
How xlwings Lite runs Python
xlwings Lite is a free Excel add-in from the Office Add-ins store. It works in Excel on Windows, on the Mac and in the browser, and it needs no local Python installation and no extra software, which removes the setup step that stops most Excel users from trying Python.

- Runs locally: the spreadsheet data stays on your computer by default.
- Code lives in the workbook: no separate macro-enabled file to pass around.
- Simple sharing: a colleague installs the same add-in and runs the same automation.
- Familiar front end: the workbook holds the buttons, inputs and outputs.
This differs from the classic desktop xlwings, where Python is installed on the machine and Excel calls it. That setup is in my xlwings crash course and in the example on collecting cell values from a folder of workbooks. For a closer look at the add-in itself, see automating Excel with xlwings Lite.
What Python adds beyond formulas
Power Query is excellent for cleaning and combining data, and I use it too. If that is your exact problem, it may be the right tool. Python covers a wider range from the same workbook:
- Data cleaning and transformation
- Connecting to APIs and online data sources
- Word documents, PDF reports and PowerPoint slides
- Interactive charts
- Forecasting, statistics and machine learning tasks

VBA can do many of these things as well. It often needs more code, and many companies block macros entirely. Python is not better for every job, but it is a flexible option when the process reaches beyond the spreadsheet.
Python and AI
AI can write a lot of the code, and I use it for that too. You still need the basics: what is possible inside Excel, how the data should be structured, and whether the generated code makes sense. Without them, AI is a black box that works until it does not.
The learning path I recommend:
- Learn the Python basics through familiar Excel concepts.
- Build one complete automation project by hand.
- Understand how the workbook, inputs, code and outputs connect.
- Use AI as a helper for your own projects.

The course
My Excel Automation Course follows that path for Excel users with no coding background. It explains Python through formulas, tables and worksheets, then builds the dashboard, the file processing workflow and the document automation from this article from scratch, one explained line at a time.
It is short on purpose: you can finish it in an afternoon and use the ideas on your own work the next day. It includes an interactive practice app that maps familiar Excel formulas to Python, and you can post questions below every lesson.
Where to start
The best first project is rarely complicated. It is the task you repeat often enough that you sigh before opening the workbook: combining monthly files, refreshing a report, exporting the same documents. Pick one process, make it reliable, and the next round of copy and paste is gone.
Merge dozens of files into one table, build interactive dashboards, generate Word documents in bulk. 52 lessons for Excel users with no coding background.
