Python in Excel (xlwings Lite) with Natural Language Instructions.
- Amar Harolikar
- Sep 6
- 2 min read
Dictate logic → AI codes. My Workflow for AI Code Generation.
𝗪𝗵𝗮𝘁 𝗜 𝗰𝗼𝘃𝗲𝗿
1. xlwings Lite - quick start
2. Robust workflow - top 5 Rules
𝗥𝗲𝘀𝘂𝗹𝘁𝘀 𝗺𝗮𝘁𝘁𝗲𝗿 - 𝗰𝗼𝗱𝗲 𝗶𝘀 𝗶𝗻𝗰𝗶𝗱𝗲𝗻𝘁𝗮𝗹
▪️What doesn’t matter: The perfect python code
▪️What matters: Delivering incremental impact without fatal errors.
𝗪𝗵𝗮𝘁 𝗱𝗼𝗲𝘀 𝗻𝗼𝘁 𝘄𝗼𝗿𝗸
Some one-shot, in-the-cloud prompt. That’s demo theatre. Fine for concept demo - they don't work on live projects.
𝗪𝗵𝗮𝘁 𝘄𝗼𝗿𝗸𝘀 - 𝗠𝘆 𝟱 𝗵𝗮𝗿𝗱 𝗿𝘂𝗹𝗲𝘀
𝟭. 𝗕𝗲 𝘀𝗽𝗲𝗰𝗶𝗳𝗶𝗰: High level gyan does not work
𝟮. 𝗜𝘁𝗲𝗿𝗮𝘁𝗲: One step at a time. Validate. Debug. It is tedious. At times frustrating.
𝟯. 𝗥𝗲𝘃𝗶𝗲𝘄: Demand plan + pseudocode from AI. Scan code if you can.
𝟰. 𝗩𝗮𝗹𝗶𝗱𝗮𝘁𝗲: Sacrosanct. An engineer doesn't 'quick scan' a plane before takeoff. Same principle.
𝟱. 𝗔𝗜 𝗔𝘂𝗱𝗶𝘁: Final pass. Feed AI complete code in new session. It will still catch misses.
𝗧𝗼𝗼𝗹𝘀 - 𝗔𝗜 𝗖𝗼𝗱𝗲𝗿𝘀
𝗚𝗲𝗺𝗶𝗻𝗶 𝟮.𝟱 𝗣𝗿𝗼 → my top pick. Huge free tier. 1M context. aistudio.google.com
ChatGPT → context fills fast + 2.5 Pro better.
𝗖𝘂𝗿𝘀𝗼𝗿 + Claude Sonnet 4 → excellent. But they have tightened usage limits. I keep it for app builds.
𝗧𝗼𝗼𝗹𝘀 - 𝗫𝗹𝘄𝗶𝗻𝗴𝘀 𝗟𝗶𝘁𝗲 𝗔𝗜 𝗖𝗼𝗱𝗲𝗿 𝗜𝗻𝘀𝘁𝗿𝘂𝗰𝘁𝗶𝗼𝗻 𝗙𝗶𝗹𝗲
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
𝗗𝗶𝗰𝘁𝗮𝘁𝗲 - 𝗱𝗼𝗻'𝘁 𝘁𝘆𝗽𝗲
▪️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)
𝗔𝗿𝗲 𝘆𝗼𝘂 𝗮 𝗞𝗮𝗿𝗽𝗮𝘁𝗵𝘆?
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
𝘅𝗹𝘄𝗶𝗻𝗴𝘀 𝗟𝗶𝘁𝗲
▪️Part of my primary stack.
Beyond automations, build standalone apps connected to databases and custom backends
▪️Official site and docs: lite.xlwings.org
▪️Created by Felix Zumstein.
𝗠𝗮𝘁𝗲𝗿𝗶𝗮𝗹𝘀
Go to app.tigzig.com → xlwings Lite Practice Lab.
Guides, workbooks, apps, instruction file - all there.
Video - 12 Min: youtu.be/rHXte26r3BY

