What This App Does
#Connect Excel directly to LLM APIs for AI-powered analysis:
- Gemini (free tier available) or any model on OpenRouter: type the model name in a cell
- Schema detection with structured JSON output: the LLM's answer follows a JSON schema set in the code
- Identify categorical and numerical variables
- Generate PostgreSQL data types and a description per column
- Python EDA driven by the detected schema: statistics, value counts, correlations
- Charts: histogram and box plot per numeric column, bar chart per categorical column
API keys stay out of the workbook
Keys are read from xlwings Lite environment variables with Local scope. They are kept in your browser and are not saved in the file.
How to Use
#- Download & open: get the workbook and open xlwings Lite (Home > Add-ins). The HOW_IT_WORKS sheet explains every step; the buttons are on the MASTER sheet.
- Add an API key: in xlwings Lite, Settings > Environment Variables, add GEMINI_API_KEY (free at aistudio.google.com) or OPENROUTER_API_KEY (openrouter.ai), scope Local, then restart xlwings Lite
- Choose the table: RBICC (RBI bank-wise ATM, POS and card statistics) or RESP (bank marketing campaign), or any Excel table you add
- Detect the schema: click "1a. Detect Schema (Gemini)" or "1b. Detect Schema (OpenRouter)"; results go to the SCHEMA sheet
- Review: edit the categorical / numeric lists on SCHEMA if you disagree with the LLM
- Run the EDA: click "2. Run EDA"; output goes to DISTROS_<table> and PLOT_<table>
How It Works
#LLM API Integration
- Sends the header and first 10 rows of your table to the chosen LLM; the EDA runs on the full table inside Excel
- Two calls in parallel: one for the categorical / numeric split, one for the PostgreSQL schema
- Structured output: both answers follow a JSON schema, so the script reads them directly
- Busy or temporary API errors are retried automatically
Automated Workflows
- Detected schema configures EDA operations
- Numeric columns: statistical analysis
- Categorical columns: frequency distributions
- Enables automation of database operations
Practical Use Cases
- Web scraping with structured output
- Text classification and summarization
- Text-to-SQL with Excel frontend
- Data preparation for database uploads