{"id":29916570,"url":"https://github.com/quangxuan98765/excel-data-processing-api","last_synced_at":"2025-08-02T05:03:02.928Z","repository":{"id":306578355,"uuid":"1026642662","full_name":"quangxuan98765/excel-data-processing-api","owner":"quangxuan98765","description":"Professional ASP.NET Core Web API for Excel Data Processing \u0026 Bulk Database Operations - Portfolio Project","archived":false,"fork":false,"pushed_at":"2025-07-26T14:18:42.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-26T16:29:53.322Z","etag":null,"topics":["aspnet-core","bulk-insert","demo-project","dotnet-core","excel-processing","power-automate","sql-server","web-api"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quangxuan98765.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-26T09:58:32.000Z","updated_at":"2025-07-26T14:18:46.000Z","dependencies_parsed_at":"2025-07-26T16:29:57.078Z","dependency_job_id":"df133ea0-e136-4cc6-9b64-e5f196f1b1fc","html_url":"https://github.com/quangxuan98765/excel-data-processing-api","commit_stats":null,"previous_names":["quangxuan98765/excel-data-processing-api"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/quangxuan98765/excel-data-processing-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quangxuan98765%2Fexcel-data-processing-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quangxuan98765%2Fexcel-data-processing-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quangxuan98765%2Fexcel-data-processing-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quangxuan98765%2Fexcel-data-processing-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quangxuan98765","download_url":"https://codeload.github.com/quangxuan98765/excel-data-processing-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quangxuan98765%2Fexcel-data-processing-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268337931,"owners_count":24234537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aspnet-core","bulk-insert","demo-project","dotnet-core","excel-processing","power-automate","sql-server","web-api"],"created_at":"2025-08-02T05:01:08.013Z","updated_at":"2025-08-02T05:03:02.836Z","avatar_url":"https://github.com/quangxuan98765.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📊 Excel Data API\n\n\u003e **ASP.NET Core Web API for Excel Data Processing \u0026 Bulk Database Operations**\n\n## 🚀 Overview\n\nExcel Data API is a robust .NET 8 Web API designed to handle bulk data import from Excel files through Power Automate integration. The API provides comprehensive data validation, error handling, and efficient database operations.\n\n### ✨ Key Features\n\n- 🔄 **Bulk Data Insert**: Efficiently process and insert large datasets from Excel files\n- ✅ **Data Validation**: Comprehensive validation with detailed error reporting\n- 🔗 **Power Automate Integration**: Seamless integration with Microsoft Power Automate flows\n- 📋 **Detailed Logging**: Complete audit trail with user tracking\n- 🛡️ **Error Handling**: Robust error handling with user-friendly responses\n- 📊 **SQL Server Integration**: Optimized database operations with connection pooling\n\n## 🏗️ Architecture\n\n```\nExcelDataAPI/\n├── Controllers/          # API Controllers\n│   └── BulkInsertController.cs\n├── Models/              # Data Models \u0026 DTOs\n│   ├── BulkInsertRequest.cs\n│   ├── BulkInsertResponse.cs\n│   ├── ExcelInputRow.cs\n│   ├── ExcelOutputRow.cs\n│   ├── FinancialDataRow.cs\n│   └── ValidationResult.cs\n├── Services/            # Business Logic\n│   ├── DataService.cs\n│   └── ValidationService.cs\n└── Program.cs          # Application Entry Point\n```\n\n## 🛠️ Technology Stack\n\n- **Framework**: .NET 8.0\n- **Web Framework**: ASP.NET Core\n- **Database**: SQL Server\n- **Data Access**: Microsoft.Data.SqlClient\n- **API Documentation**: Swagger/OpenAPI\n- **Architecture**: Clean Architecture with Service Layer\n\n## 📋 Prerequisites\n\n- .NET 8.0 SDK\n- SQL Server (LocalDB, Express, or Full)\n- Visual Studio 2022 / VS Code (optional)\n- Power Automate (for integration)\n\n## 🚀 Getting Started\n\n### 1. Clone the Repository\n```bash\ngit clone https://github.com/quangxuan98765/excel-data-processing-api\ncd ExcelDataAPI-Project\n```\n\n### 2. Configure Database Connection\nUpdate connection string in `appsettings.json`:\n```json\n{\n  \"ConnectionStrings\": {\n    \"DefaultConnection\": \"Server=(localdb)\\\\mssqllocaldb;Database=YourDatabase;Trusted_Connection=true;\"\n  }\n}\n```\n\n### 3. Build and Run\n```bash\ncd ExcelDataAPI\ndotnet restore\ndotnet build\ndotnet run\n```\n\n### 4. Access API Documentation\n- **Swagger UI**: `https://localhost:7xxx/swagger`\n- **API Base URL**: `https://localhost:7xxx/api`\n\n## 🔗 API Endpoints\n\n### POST `/api/BulkInsert/financial-data`\n\nBulk insert financial data with validation.\n\n**Request Body:**\n```json\n{\n  \"data\": [\n    {\n      \"soTaiKhoan\": \"1234567890\",\n      \"tenTaiKhoan\": \"Nguyen Van A\",\n      \"soTien\": 1000000,\n      \"ngayGiaoDich\": \"2024-01-15\",\n      \"moTa\": \"Thu nhập tháng 1\"\n    }\n  ],\n  \"idNguoiDung\": \"USER001\",\n  \"nguoiNhap\": \"Admin User\"\n}\n```\n\n**Response:**\n```json\n{\n  \"success\": true,\n  \"message\": \"Xử lý thành công 1/1 bản ghi\",\n  \"totalRows\": 1,\n  \"successRows\": 1,\n  \"errorRows\": 0,\n  \"errors\": [],\n  \"processedData\": [...]\n}\n```\n\n## 🔧 Power Automate Integration\n\nThe API is designed to work seamlessly with Power Automate flows:\n\n1. **Excel Online Connector**: Read data from Excel files\n2. **HTTP Connector**: Send data to API endpoint\n3. **Data Transformation**: Format data according to API schema\n4. **Error Handling**: Process API responses and handle errors\n\n## 🧪 Testing\n\n### Using Swagger UI\n1. Navigate to `/swagger`\n2. Expand the `POST /api/BulkInsert/financial-data` endpoint\n3. Click \"Try it out\"\n4. Enter sample data and execute\n\n### Using PowerShell (Example)\n```powershell\n$body = @{\n    data = @(\n        @{\n            soTaiKhoan = \"1234567890\"\n            tenTaiKhoan = \"Test Account\"\n            soTien = 1000000\n            ngayGiaoDich = \"2024-01-15\"\n            moTa = \"Test transaction\"\n        }\n    )\n    idNguoiDung = \"TEST_USER\"\n    nguoiNhap = \"Test Admin\"\n} | ConvertTo-Json -Depth 3\n\nInvoke-RestMethod -Uri \"https://localhost:7xxx/api/BulkInsert/financial-data\" -Method POST -Body $body -ContentType \"application/json\"\n```\n\n## 📊 Database Schema\n\n### FinancialData Table\n```sql\nCREATE TABLE FinancialData (\n    Id BIGINT IDENTITY(1,1) PRIMARY KEY,\n    SoTaiKhoan NVARCHAR(50) NOT NULL,\n    TenTaiKhoan NVARCHAR(255) NOT NULL,\n    SoTien DECIMAL(18,2) NOT NULL,\n    NgayGiaoDich DATE NOT NULL,\n    MoTa NVARCHAR(500),\n    IDNguoiDung NVARCHAR(100) NOT NULL,\n    NguoiNhap NVARCHAR(255) NOT NULL,\n    NgayTao DATETIME2 DEFAULT GETDATE(),\n    NgayCapNhat DATETIME2 DEFAULT GETDATE()\n);\n```\n\n## 🛡️ Security Features\n\n- Input validation and sanitization\n- SQL injection prevention\n- Data type validation\n- Business rule validation\n- Comprehensive error logging\n\n## 🔄 Future Enhancements\n\n- [ ] Authentication \u0026 Authorization (JWT)\n- [ ] File upload endpoint for direct Excel processing\n- [ ] Data export functionality\n- [ ] Real-time processing status\n- [ ] Batch processing queues\n- [ ] Advanced reporting features\n\n## 📝 Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 📞 Contact\n\n**Developer**: [Quang](#)  \n**Email**: [acongchuongheo@gmail.com](mailto:acongchuongheo@gmail.com)  \n**LinkedIn**: [Quang Xuân](https://www.linkedin.com/in/quang-xuan-669491349/)  \n**GitHub**: [@quangxuan98765](https://github.com/quangxuan98765)\n\n---\n\n⭐ **Star this repository if you find it helpful!**\n\n\u003e This project demonstrates professional .NET development practices, clean architecture, and real-world API design patterns. Perfect for learning, portfolio showcasing, and practical business applications.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquangxuan98765%2Fexcel-data-processing-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquangxuan98765%2Fexcel-data-processing-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquangxuan98765%2Fexcel-data-processing-api/lists"}