Ask questions about your Excel spreadsheets using natural language. Upload a .xlsx file and get answers as clean tables or summaries. The app uses LangChain CSV agents powered by Google Gemini to understand your data—including targeted Q&A over Comments/Feedback columns.
Looking for: Excel chatbot, Excel Q&A, talk to Excel, query Excel with AI, spreadsheet assistant, CSV agent, Streamlit chatbot for Excel.
Optional: Deploy on Streamlit Cloud
- Overview
- Features
- Quickstart
- Configuration (API Key)
- Usage Examples
- How it Works
- Troubleshooting
- FAQ
- Contributing
- License
Excel Chatbot is a lightweight Streamlit web app that lets you chat with your Excel data. It:
- accepts Excel (.xlsx) uploads
- answers questions in plain English
- returns results as tables when you ask for lists/filters
- can focus specifically on a Comments column for feedback analysis
This project is ideal for analysts, HR/PeopleOps, and teams who need quick insights from spreadsheets without writing formulas.
- Upload Excel files (.xlsx)
- Natural-language questions ("Show all employees in Sales")
- Structured results (CSV/table) when requested
- Comments/Feedback-aware queries
- Chat history sidebar with delete/clear
- Works locally; no data leaves your machine except to the LLM provider
-
Clone the repo
git clone https://github.com/jambhaleAnuj/Excel_AI_Chat.git cd Excel_AI_Chat
-
Create and activate a virtual environment (Windows PowerShell)
python -m venv .venv ./.venv/Scripts/Activate.ps1
-
Install dependencies
pip install -r requirements.txt
-
Configure your Google Generative AI key
$env:GOOGLE_API_KEY = "your-google-api-key"
-
Run the app
streamlit run app.py
Open the URL shown (usually http://localhost:8501), upload an Excel file, and start asking questions.
Get a key from Google AI Studio: https://aistudio.google.com/app/apikey
Set it via environment variable (recommended):
$env:GOOGLE_API_KEY = "your-google-api-key"
Or configure Streamlit secrets (for deployment):
- .streamlit/secrets.toml
GOOGLE_API_KEY = "your-google-api-key"
- List employees in the Sales department.
- List the names of employees whose status is internal project (answer in table format).
- Show comments for employee Jane Smith (don’t truncate).
- Give a summary of feedback for the marketing team.
Tip: For tabular output, include phrases like “list”, “table”, “csv”, “show”, or “filter”.
- The app loads your Excel into pandas.
- It builds two LangChain CSV agents: one for the main data and one focused on the Comments column.
- A small prompt-engineering layer encourages the model to return CSV when your query asks for structured output.
- The app tries to parse CSV/table-like answers and renders them as a Streamlit dataframe. If the model replies in natural language, you’ll see it as chat text.
- ModuleNotFoundError: Run
pip install -r requirements.txt
. - API key issues: Ensure GOOGLE_API_KEY is set in your shell or Streamlit secrets.
- Excel read errors: Use .xlsx and ensure the file is not open elsewhere.
- Output looks like a single line but should be a table: Ask explicitly for “answer in table/csv format”. The app also auto-parses common single-column formats.
Q: Does my data get uploaded to the internet?
A: The file is processed locally, but your prompts and extracted context go to the LLM provider. Don’t use sensitive data.
Q: Can I use OpenAI or another LLM?
A: The code is structured around LangChain CSV agents. You can swap the model with a compatible LangChain chat model.
Q: How do I deploy?
A: You can deploy on Streamlit Community Cloud or any platform that runs Streamlit (ensure GOOGLE_API_KEY is configured as a secret).
Contributions are welcome! See CONTRIBUTING.md for how to report bugs, request features, and open pull requests.
If you find this useful:
- Star the repo to help others discover it
- Share it on social media or your team chat
MIT — see LICENCE.
Extra keywords to help search engines index relevant phrases:
excel chatbot, excel ai, streamlit excel chatbot, talk to excel, query excel with ai, excel q&a, spreadsheet chatbot, csv agent, langchain excel, google gemini excel, hr feedback analysis excel, employee comments analysis, excel analytics ai, data assistant for excel