How huangsunyang/miniexcel works
Project type and purpose
• MiniExcel is an open‑source .NET class library for high‑performance, low‑memory Excel (XLSX/CSV) reading, writing, and templating. It targets .NET ≥ 4.5, exposes simple APIs (MiniExcel.Query, MiniExcel.SaveAs, MiniExcel.SaveAsByTemplate), and avoids OOM by streaming and disk‑caching.
File structure
• Top‑level folders:
• src/MiniExcel – core library modules
• tests – integration and unit test projects (ASP.NET Core, MVC, WebForms, pure tests)
• benchmarks – performance measurement console
• samples/docs – sample Excel files and documentation
• Key sub‑modules under src/MiniExcel:
• Attributes – custom attributes for mapping (ExcelColumn, Width, Format…)
• Csv – CSV reader/writer, configuration
• OpenXml – XLSX reader/writer using OpenXML, streaming, caching, merge‐cell handling
• Zip – low‑level ZIP packaging abstractions
• Reflection – POCO <→ Excel mapping helpers
• Utils – reusable helpers (DateTime, string, XML, file, list, etc.)
• Interfaces – IExcelReader/IExcelWriter/IConfiguration
• ExcelFactory – entry point that selects CSV vs OpenXml path
• Supporting files:
• MiniExcel.sln & .csproj – solution and project definitions
• appveyor.yml & GitHub workflows – CI/CD pipelines
• benchmarks – BenchmarkDotNet logic
• samples – curated XLSX/CSV files for testing/demos
README.md for additional insights
• It describes the library’s goals (low memory, streaming, deferred LINQ, templating).
• It calls out benchmarks and shows typical usage patterns.
• It documents advanced features (disk‑based shared string cache, merge‑cells, CSV customization, dynamic columns/sheets).
Be detailed but not over‑complicated
• Every major sub‑module as a separate component.
• Interfaces and factory as the glue.
• Avoid over‑splitting utility classes — group them under “Utils”.
• How tests, benchmarks, and samples plug in as consumers of the public API.