A powerful Excelโlike web application with advanced AI-powered spreadsheet assistant built with Streamlit and OpenAI GPT-4-Turbo. Features a modern ribbon interface, robust file management, and comprehensive formula support. This app is deployed on https://paramshah07-excelexcel-cursor-mvp-streamlit-app-enhanced-yepqyt.streamlit.app/
- Ribbon-style Navigation: Familiar Excel-like tabs (Home, Insert, Formulas, Data, Review)
- Theme Support: Auto, Light, and Dark themes with comprehensive styling
- Multi-sheet Support: Create, switch, and manage multiple spreadsheet tabs
- Excel-style Grid: Professional data editor with proper row/column numbering
- Interactive Data Editor: Click-to-edit cells with auto-save functionality
- Smart Column Types: Automatic detection of numeric, date, and text columns
- Formula Bar: Enhanced formula input with help documentation and examples
- Bulk Operations: Apply formulas to entire columns or individual cells
- Mathematical:
=A1+B1,=SUM(A1:A10),=AVERAGE(A1:A10),=MIN(),=MAX() - Statistical:
=COUNT(),=STDEV(),=VAR(),=MEDIAN(),=MODE() - Text Functions:
=CONCATENATE(),=LEFT(),=RIGHT(),=MID(),=LEN(),=UPPER(),=LOWER() - Date/Time:
=TODAY(),=NOW(),=WEEKDAY(),=YEAR(),=MONTH(),=DAY() - Lookup:
=VLOOKUP(),=HLOOKUP(),=INDEX(),=MATCH()
- Smart Upload System: Duplicate prevention with session state tracking
- Auto-save: Automatic backups with timestamp management
- File Selection: Browse and load previously saved files
- Multi-format Support: CSV and XLSX import/export
- Data Directory Management: Organized file storage with cleanup utilities
- Interactive Charts: Line charts, bar charts, and scatter plots with Plotly
- Quick Statistics: Instant statistical analysis with visual summaries
- Sort & Filter: Advanced data manipulation with multiple criteria
- Pivot Tables: Data aggregation and analysis (coming soon)
- Intelligent Data Generation: Context-aware sample data creation that understands business domains
- GPT-4-Turbo Integration: Advanced AI agent with 30-second timeout and enhanced error handling
- Smart Fallback System: High-quality template generation when AI is unavailable
- Natural Language Processing: Conversational interface for spreadsheet operations
- Contextual Understanding: AI knows current sheet structure and data
- 11 Specialized Tools: Complete spreadsheet manipulation toolkit including intelligent data generation
- Sample Data Generation: Create realistic test data with contextual content (restaurants, employees, products, sales)
- Operation Logging: Track all AI operations with timestamps
- Model Selection: Support for multiple OpenAI models
- Robust Error Handling: Graceful handling of invalid operations and API timeouts
- Comprehensive Testing: 36+ unit tests covering all core functionality including AI tools
- Professional Environment: Modern
.venvsetup with proper dependency management - Error Handling: Robust error management with user-friendly messages
- Performance Optimization: Efficient data processing and memory management
- AI Tool Testing: Dedicated test suite for AI agent functionality and error handling
- Python 3.10+
- OpenAI API key with GPT-4-Turbo access
-
Clone the repository
git clone https://github.com/paramshah07/excelexcel-cursor-mvp.git cd excelexcel-cursor-mvp -
Set up Python environment
python3 -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure OpenAI API Key
Create a
.envfile in the project root:OPENAI_API_KEY="your-openai-api-key-here" OPENAI_CHAT_MODEL="gpt-4-turbo-2024-04-09" # Optional: specify model
-
Run the application
streamlit run streamlit_app_enhanced.py
-
Open your browser
Navigate to
http://localhost:8501
- ๐ค Import Data: Use the ribbon's file uploader to import CSV or XLSX files
- ๐ Sort Data: Select column and order in the Data tab
- ๐ Filter Data: Apply filters by column value in the Data tab
- ๐ Create Charts: Use the Insert tab to build interactive visualizations
- ๐งฎ Apply Formulas: Use the enhanced formula bar with auto-complete help
- ๐พ Auto-save: Changes are automatically saved with timestamp management
Use the sidebar chat to interact with the AI agent using natural language:
Data Manipulation:
- "Sort column A in ascending order"
- "Filter rows where column B equals 'Active'"
- "Calculate the sum of column D and put it in E1"
- "Add a new column F with the average of A and B"
Visualization:
- "Create a line chart showing sales over time"
- "Make a bar chart comparing revenue by region"
- "Show me a scatter plot of price vs quantity"
Formula Operations:
- "Apply =SUM(A1:A10) to cell B11"
- "Calculate running totals in column C"
- "Find the maximum value in column D"
Data Generation:
- "Create me stock data for AAPL for 30 days with Date, Price, News and Volume columns"
- "Generate sample sales data with 50 rows including customer info and purchase amounts"
- "Fill this sheet with realistic employee data - names, departments, and salaries"
- "Generate restaurant directory with cuisine types and ratings for my food app"
File Operations:
- "Export the current sheet as CSV"
- "Create a new sheet called 'Analysis'"
- "Load the sample data from the data directory"
Advanced Operations:
- "Sort the data by date, then by amount in descending order"
- "Calculate monthly totals and create a summary table"
- "Find all rows where sales are above average and highlight them"
The project includes prompts-example.txt with tested prompts that demonstrate the AI capabilities:
1) Create me stock data for AAPL for 30 days for the month of July 2025,
add 4 columns Date, price, News and market Cap.
Fill in these columns with random but sensible data
Run the included demo to see the intelligent data generation system in action:
python demo_ai_generation.pyThis demonstrates how the AI system automatically understands context and generates appropriate data:
- Restaurant data: Realistic names, cuisine types, pricing, and ratings
- Employee data: Professional names, departments, realistic salaries, and ages
- Product data: Proper product IDs, descriptive names, appropriate pricing
- Sales data: Representative names, products, quantities, and totals
The system works with intelligent templates (no API key required) and can be enhanced with OpenAI integration for even more sophisticated generation. See AI_SETUP.md for details.
excelexcel-cursor-mvp/
โโโ app/
โ โโโ agent/ # AI agent implementation
โ โ โโโ agent.py # Main AI agent with GPT-4-Turbo and function calling
โ โ โโโ tools.py # AI tool definitions and spreadsheet operations
โ โโโ services/ # Core spreadsheet logic
โ โ โโโ workbook.py # Workbook and sheet management
โ โโโ ui/ # UI components and formulas
โ โ โโโ app.py # Original UI components
โ โ โโโ formula.py # Enhanced formula evaluation engine
โ โโโ charts.py # Interactive chart generation with Plotly
โโโ tests/ # Comprehensive test suite (36+ tests)
โ โโโ test_agent.py # AI agent functionality tests (7 tests)
โ โโโ test_agent_tools.py # AI tool functionality tests (19 tests)
โ โโโ test_formulas.py # Formula engine tests (8 tests)
โ โโโ test_integration.py# End-to-end integration tests (3 tests)
โ โโโ test_workbook.py # Core workbook operation tests (5 tests)
โ โโโ debug_agent_tools.py # Debug utilities for agent development
โ โโโ test_data_generation.py # Data generation testing utilities
โ โโโ test_final.py # Final integration validation
โ โโโ test_function_calling.py # Function calling mechanism tests
โ โโโ test_tool_calling.py # Tool calling validation
โ โโโ run_tests.py # Test runner script
โโโ data/ # Auto-managed data directory
โ โโโ sample.csv # Sample dataset
โ โโโ *.csv # User uploaded and auto-saved files
โโโ .venv/ # Python virtual environment
โโโ streamlit_app_enhanced.py # Main application entry point
โโโ demo_ai_generation.py # AI intelligence demonstration script
โโโ data_manager.py # Data directory management utility
โโโ prompts-example.txt # Example prompts for testing AI functionality
โโโ AI_SETUP.md # AI system setup and configuration guide
โโโ run_app.sh # Application startup script
โโโ SETUP_STATUS.md # Development environment documentation
โโโ requirements.txt # Python dependencies
โโโ .env # Environment variables (create this)
โโโ .gitignore # Git ignore patterns
โโโ README.md # This documentation
- Streamlit 1.48+: Modern web framework with advanced components
- Custom CSS: Comprehensive theming system (Light/Dark/Auto)
- Responsive Design: Professional Excel-like interface with ribbon navigation
- Python 3.12: Modern Python with type hints and enhanced performance
- Pandas 2.3+: Advanced data manipulation and analysis
- NumPy 2.3+: Numerical computing foundation
- OpenPyXL 3.1+: Excel file format support (.xlsx)
- OpenAI API 1.99+: GPT-4-Turbo integration with function calling
- Function Calling: Structured AI interactions with spreadsheet operations
- Context Management: Intelligent session state and conversation tracking
- Plotly 6.3+: Interactive charts and data visualization
- Matplotlib 3.10+: Statistical plotting and analysis
- Altair 5.5+: Grammar of graphics visualizations
- Pytest: Comprehensive testing framework (19 tests)
- Virtual Environment: Modern
.venvsetup with dependency isolation - Git Workflow: Feature branch development with detailed commit history
- Linting: Code quality and formatting standards
- Glob Pattern Matching: Advanced file discovery and management
- Session State: Robust upload duplicate prevention
- Auto-save: Intelligent backup system with timestamp management
- Data Organization: Structured directory management with cleanup utilities
# Activate virtual environment
source .venv/bin/activate
# Run all tests (36+ comprehensive tests)
python tests/run_tests.py
# Or use pytest
python -m pytest tests/ -v
# Run specific test categories
python -m pytest tests/test_formulas.py -v # Formula engine tests
python -m pytest tests/test_agent.py -v # AI agent tests
python -m pytest tests/test_agent_tools.py -v # AI tool functionality tests
python -m pytest tests/test_workbook.py -v # Core functionality tests
python -m pytest tests/test_integration.py -v # Integration tests# Clone and setup
git clone https://github.com/paramshah07/excelexcel-cursor-mvp.git
cd excelexcel-cursor-mvp
# Setup development environment
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Create environment file
cp .env.example .env # Edit with your API keys
# Run tests with detailed output
python tests/run_tests.py
# Start development server
streamlit run streamlit_app_enhanced.py# Use the data management utility
python data_manager.py list # List all files in data directory
python data_manager.py clean # Remove duplicate files
python data_manager.py show sample.csv # Preview file contents- Code Quality: Follow PEP 8 style guidelines
- Testing: Add tests for new functionality
- Documentation: Update README and code comments
- Commit Messages: Use clear, descriptive commit messages
- Formula Engine: Simplified implementation, not full Excel compatibility
- File Size: Large datasets may impact performance
- Concurrent Users: Single-user application (not multi-tenant)
- Advanced Excel Features: No VBA, macros, or complex Excel functions
- ๐ Real-time Collaboration: Multi-user editing with conflict resolution
- ๐ Advanced Charts: Pivot charts, combo charts, and custom visualizations
- ๐ Advanced Filtering: Multi-criteria filters and custom filter expressions
- ๐ Pivot Tables: Full pivot table functionality with drag-and-drop interface
- ๐ Data Connections: Database connectivity and external data sources
- ๐จ Enhanced Formatting: Cell styling, conditional formatting, and themes
- ๐ฑ Mobile Responsiveness: Optimized mobile and tablet experience
This project is open source and available under the MIT License.
This is an MVP (Minimum Viable Product) demonstration showcasing AI-powered spreadsheet capabilities. While functional and feature-rich, it is not intended as a complete replacement for Microsoft Excel or Google Sheets. The formula engine implements core functionality and is intentionally simplified for demonstration purposes.
- Repository: https://github.com/paramshah07/excelexcel-cursor-mvp
- Issues: Report bugs or request features
- Pull Requests: Contribute to the project