Skip to content

AyushPandey003/ExcelSmartV2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📗 ExcelSmart v2 — AI Excel Tutor & File Analyzer

Full-stack Excel learning + generation + file analysis tool.

  • Frontend: React 18 + Vite
  • Backend: ASP.NET Core 8 + EPPlus 7 (NonCommercial License)
  • AI: Gemini (Bring Your Own Key from browser)

🆕 What's New in v2

Feature Details
EPPlus 7 Replaced ClosedXML — faster, richer chart/table API
📊 Chart Sheet Generate .xlsx files with auto-built chart sheets (Column/Bar/Line/Pie)
📂 Upload & Analyze Upload any .xlsx/.csv — detect errors, view formulas, ask AI
🤖 Context-aware AI AI receives your actual file data → gives specific answers
Error Detection Flags #REF!, #VALUE!, #DIV/0!, #NAME?, #N/A, etc. with explanations
🔧 Fix with AI One-click "Fix with AI" button on every detected error

🗂️ Project Structure

ExcelSmartV2/
├── frontend/
│   └── src/pages/
│       ├── Dashboard.jsx        ← Home + navigation
│       ├── LearnExcel.jsx       ← 12 step-by-step lessons with quizzes
│       ├── FormulasRef.jsx      ← 40+ formula reference (searchable)
│       ├── AskExcel.jsx         ← ExcelBot AI chat tutor
│       ├── ExcelGen.jsx         ← 8 templates + chart options → .xlsx
│       └── UploadAnalyze.jsx    ← 📂 NEW: upload file + AI analysis
│
└── backend/
    ├── Program.cs               ← EPPlus NonCommercial license set here
    ├── Services/
    │   ├── ExcelService.cs      ← EPPlus: generate xlsx + chart sheets
    │   └── ExcelAnalysisService.cs ← Parse uploaded files, detect errors
    ├── Controllers/
    │   └── ExcelController.cs   ← POST /generate, POST /upload, GET /health
    └── Models/Models.cs         ← ExcelRequest, UploadAnalysisResult, etc.

🚀 Quick Start

Frontend

cd frontend
npm install
npm run dev
# → http://localhost:3000

AI key setup (BYOK):

  • Open any AI page (Ask ExcelBot, Generate Excel, or Upload & Analyze)
  • Paste your Gemini API key in the Bring Your Own Gemini API Key panel
  • The key is stored only in browser session storage for the current tab
  • The key is sent directly from browser to Gemini and never stored on ExcelSmart servers

Get a Gemini API key from Google AI Studio.

Backend

cd backend
dotnet restore
dotnet run
# → http://localhost:5000
# → Swagger: http://localhost:5000/swagger

Requires .NET 8 SDK


⚖️ EPPlus License

EPPlus 7 is configured for NonCommercial use in Program.cs:

ExcelPackage.LicenseContext = LicenseContext.NonCommercial;

This is free for:

  • Personal projects
  • Educational use
  • Open-source non-commercial apps
  • Learning and development

For commercial use: purchase a license at https://epplussoftware.com


📊 API Endpoints

POST /api/excel/generate

Generate a formatted .xlsx file.

{
  "title": "Monthly Budget",
  "headers": ["Category", "Amount"],
  "rows": [["Food", 5000], ["Rent", 12000]],
  "includeChart": true,
  "chartType": "Column"
}

Returns: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

POST /api/excel/upload

Upload and analyze an .xlsx file.

  • multipart/form-data
  • Field: file (IFormFile)
  • Optional: sheet (sheet name to parse)

Returns: UploadAnalysisResult JSON with headers, rows, detected errors, formulas, stats.

GET /api/excel/health

{ "status": "ok", "engine": "EPPlus 7 (NonCommercial)", "time": "..." }

📂 Upload & Analyze Features

When you upload an Excel file, the app:

  1. Parses all sheets, shows sheet names
  2. Extracts headers + up to 200 rows for preview
  3. Scans ALL cells for Excel errors (#REF!, #VALUE!, #DIV/0!, #NAME?, #N/A, #NULL!, #NUM!, ######)
  4. Lists all formulas found with their cell addresses
  5. Computes stats (Sum, Average, Min, Max of numeric cells)
  6. Passes file context to the AI → gives SPECIFIC answers about YOUR data
  7. "Fix with AI" button on each error → instant explanation + fix formula

📊 Generated Excel Features (EPPlus)

  • ✅ Title bar row (Excel green)
  • ✅ Styled header row with column labels
  • ✅ Alternating row shading (green/white)
  • ✅ Auto-detected currency columns → ₹ formatting
  • ✅ Auto-totals row for numeric columns
  • ✅ Excel Table with filter dropdowns
  • ✅ Frozen header rows (scroll but headers stay visible)
  • ✅ Auto-fit column widths
  • ✅ Print setup (A4, landscape for wide sheets)
  • ✅ Header/footer with title + "Generated by ExcelSmart"
  • Chart Sheet (Column/Bar/Line/Pie) — NEW in v2

📝 License

MIT — free to use, study, and extend. EPPlus usage restricted to NonCommercial per their license.

About

Smart excel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors