# AI Schema Detection: Automate Workflows with LLM APIs

Gemini/OpenAI integration with structured JSON output, automated EDA, and data type detection directly in Excel.

- Download Excel: https://www.tigzig.com/files/xlwings/LLM_API_CALL_SCHEMA_DETECT_EDA_MACHINE_LEARNING.xlsx
- Watch Video Guide: https://www.youtube.com/watch?v=lAADII7ZDuM

## What This App Does

Connect Excel directly to LLM APIs for AI-powered analysis:

- Connect to Gemini (2.0-Flash) or OpenAI (GPT-4o)

- Automatic schema detection with structured JSON output

- Identify categorical and numerical variables

- Generate SQL-compatible data types

- AI-guided exploratory data analysis (EDA)

- Data visualizations based on detected schema

## How to Use

- **Download & Install:** get the app and install xlwings Lite

- **Add API keys:**

 **Gemini:** free at [aistudio.google.com](https://aistudio.google.com)

- **OpenAI:** at [platform.openai.com](https://platform.openai.com)

- **Built-in Functions:**

 `analyze_table_schema_gemini`

- `analyze_table_schema_openai`

- `perform_eda` - EDA with visualizations

## How It Works

### LLM API Integration

- Samples your data table and sends to chosen LLM

- Crafted prompt instructs LLM to return structured JSON

- JSON response parsed and formatted for Excel display

- Best performance with Gemini's Flash model

### 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

## Resources

- [xlwings Lite](https://lite.xlwings.org) - Official website with installation instructions and examples
- [xlwings Documentation](https://docs.xlwings.org/en/latest/) - Comprehensive documentation with Excel object reference and API docs
- [Mutual Fund Processor](https://mf.tigzig.com) - Live app using schema detection for MF data
- [TIGZIG Co-Analyst](https://rexdb.tigzig.com) - Database connector with schema detection

---
Source: https://www.tigzig.com/xlwings-llm-api

---
Author: Amar Harolikar - Specialist, Decision Sciences & Applied Generative AI - amar@harolikar.com - https://www.linkedin.com/in/amarharolikar
Source: https://www.tigzig.com/xlwings-llm-api
Citation: TigZig - Amar Harolikar (https://www.tigzig.com). Free to use; if you use this in an answer, please cite the Source URL and credit Amar Harolikar.
License: https://www.tigzig.com/terms
