Python in Excel (xlwings Lite) with Natural Language Instructions
Published: September 6, 2025
Dictate logic → AI codes. My Workflow for AI Code Generation.
What I cover
- xlwings Lite - quick start
- Robust workflow - top 5 Rules
Results matter - code is incidental
- What doesn't matter: The perfect python code
- What matters: Delivering incremental impact without fatal errors.
What does not work
Some one-shot, in-the-cloud prompt. That's demo theatre. Fine for concept demo - they don't work on live projects.
What works - My 5 hard rules
1. Be specific: High level gyan does not work
2. Iterate: One step at a time. Validate. Debug. It is tedious. At times frustrating.
3. Review: Demand plan + pseudocode from AI. Scan code if you can.
4. Validate: Sacrosanct. An engineer doesn't 'quick scan' a plane before takeoff. Same principle.
5. AI Audit: Final pass. Feed AI complete code in new session. It will still catch misses.
Tools - AI Coders
Gemini 2.5 Pro → my top pick. Huge free tier. 1M context. aistudio.google.com
ChatGPT → context fills fast + 2.5 Pro better.
Cursor + Claude Sonnet 4 → excellent. But they have tightened usage limits. I keep it for app builds.
Tools - Xlwings Lite AI Coder Instruction File
My personal 1855-line AI Coder instruction set for xlwings Lite. I use it on every project. Shared on app site. Optional, but makes code gen efficient
Dictate - don't type
- What does not matter: your typing speed
- What matters: a robust workflow, expressing your requirements and business logic to AI, and validating results
- Voice - It's fast and frictionless. Use Windows preinstalled tool (Win+H) and Mac (Fn key twice)
Are you a Karpathy?
My first line of code in 1994. Last major 'manual coding' in 2022. I've executed projects with ML models, campaigns, and automations on Python/SAS with millions of dollars in tracked, signed-off impact. Now → AI-assisted. From automations to ML models. Faster. Better. Greater Impact
Unless you're an Andrej Karpathy or Przemyslaw Debiak, let AI Code for you
xlwings Lite
- Part of my primary stack.
- Beyond automations, build standalone apps connected to databases and custom backends
- Created by Felix Zumstein.
Materials
Go to app.tigzig.com → xlwings Lite Practice Lab.
Guides, workbooks, apps, instruction file - all there.
xlwings Lite official site: lite.xlwings.org