{"id":19699245,"url":"https://github.com/arjunvachhani/xlsxhelper","last_synced_at":"2025-10-07T11:38:31.406Z","repository":{"id":189369768,"uuid":"680554050","full_name":"ArjunVachhani/XlsxHelper","owner":"ArjunVachhani","description":"An memory efficient, fast excel file reader designed for processing large Xlsx files.","archived":false,"fork":false,"pushed_at":"2023-09-16T14:38:10.000Z","size":92219,"stargazers_count":12,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-13T15:19:47.902Z","etag":null,"topics":["dotnet","dotnet-core","excel","excelreader","fast","huge-data-files","huge-files","low-memory","xlsx","xlsxreader"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArjunVachhani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-08-19T16:11:45.000Z","updated_at":"2025-04-17T10:59:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"9697d349-4b59-4db3-912c-d0528fb93636","html_url":"https://github.com/ArjunVachhani/XlsxHelper","commit_stats":null,"previous_names":["arjunvachhani/xlsxhelper"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ArjunVachhani/XlsxHelper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArjunVachhani%2FXlsxHelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArjunVachhani%2FXlsxHelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArjunVachhani%2FXlsxHelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArjunVachhani%2FXlsxHelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArjunVachhani","download_url":"https://codeload.github.com/ArjunVachhani/XlsxHelper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArjunVachhani%2FXlsxHelper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278766463,"owners_count":26042203,"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-10-07T02:00:06.786Z","response_time":59,"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":["dotnet","dotnet-core","excel","excelreader","fast","huge-data-files","huge-files","low-memory","xlsx","xlsxreader"],"created_at":"2024-11-11T20:01:57.879Z","updated_at":"2025-10-07T11:38:31.401Z","avatar_url":"https://github.com/ArjunVachhani.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XlsxHelper\n![](https://github.com/ArjunVachhani/XlsxHelper/workflows/.NET/badge.svg?branch=main)\n\nXlsxHelper has been crafted with the primary intention of efficiently parsing extensive Excel files. This library is designed to be lightweight, ensuring that it doesn't load the entire dataset into memory all at once. Instead, it adopts a sequential approach, fetching and returning one row per iteration. As a result of this methodology, the memory overhead is minimized.\n\n### When to use XlsxHelper\n- You need to process large xlsx file.\n- You want to read content with very little RAM usage.\n- You want full control of mapping/parsing fields to Model.\n\n### When to not use XlsxHelper\n- You want to read rows in random manner.\n- You want to read thing like width of row/column, font size / color etc \n- You want to read xls file format.\n\n### Project Status\nXlsxHelper is actively maintained. Please feel free to ask question and raise issues.\n\n### How to get started\nInstall NuGet package https://www.nuget.org/packages/XlsxHelper/\n\n### Example 1\n```csharp\nusing (var workbook = XlsxReader.OpenWorkbook(filePath))\n{\n    foreach (var worksheet in workbook.Worksheets)//read all worksheets\n    {\n        Console.WriteLine($\"Worksheet {worksheet.Name}\"); //get name of worksheet\n        using var worksheetReader = worksheet.WorksheetReader; //get WorksheetReader from worksheet\n        foreach (var row in worksheetReader) //read row from worksheetreader\n        {\n            Console.WriteLine($\"Content of row {row.RowNumber}\"); //display current row number\n            foreach (var cell in row.Cells) // Display all cell content\n            {\n                Console.WriteLine($\"[{cell.CellValue} at ({cell.ColumnName}{row.RowNumber})]\");\n            }\n            Console.WriteLine($\"Content of row {row.RowNumber} ends.\");\n        }\n    }\n}\n```        \n\n### Example 2\n```csharp\nusing (var workbook = XlsxReader.OpenWorkbook(filePath))\n{\n    var worksheet = workbook.Worksheets.First();\n    bool headerRow = true;\n    Dictionary\u003cstring, ColumnName\u003e headerLooklup = null;\n    foreach (var row in worksheet.WorksheetReader)\n    {\n        if (headerRow)\n        {\n            headerLooklup = ReadHeader(row); //Read all header names from first row\n            headerRow = false;\n            continue;\n        }\n        var student = new Student();\n        student.FirstName = row[headerLooklup[nameof(Student.FirstName)]].CellValue; //get cell value \n        student.LastName = row[headerLooklup[nameof(Student.LastName)]].CellValue;\n        student.Grade = row[headerLooklup[nameof(student.Grade)]].CellValue;\n        student.Marks = new Marks\n        {\n            Biology = row[headerLooklup[nameof(Marks.Biology)]].GetInt32(),\n            Chemistry = row[headerLooklup[nameof(Marks.Chemistry)]].GetInt32(),\n            Mathematics = row[headerLooklup[nameof(Marks.Mathematics)]].GetInt32(),\n            Physics = row[headerLooklup[nameof(Marks.Physics)]].GetInt32()\n        };\n\n        //Process student object. \n        //yield return student;\n    }\n\n    static Dictionary\u003cstring, ColumnName\u003e ReadHeader(Row row) //read header\n    {\n        Dictionary\u003cstring, ColumnName\u003e headerLooklup = new Dictionary\u003cstring, ColumnName\u003e();\n        foreach (var cell in row.Cells)\n        {\n            headerLooklup.Add(cell.CellValue, cell.ColumnName);\n        }\n        return headerLooklup;\n    }\n}\n```\n\n### XlsxHelper is fast and lightweight for normal files. Below results shows time and memory used to read 50MB/50,000 Records\n\n|                                               | XlsxHelper | LightweightExcelReader | ExcelDataReader AsDataset | ExcelDataReader |\n|-----------------------------------------------|------------|------------------------|---------------------------|-----------------|\n| Time to read first row                        | 5ms        | 14ms                   | -                         | -               |\n| Time to read all rows(50,000)                 | 3.90 sec   | 7.60 sec               | 13.50 sec                 | 10.10 sec       |\n| Memory usage at the time of reading first row | 31.412 MB  | 32.649 MB              | -                         | 42.057 MB       |\n| Memory usage at the time of reading last row  | 38.891 MB  | 901.976 MB             | 471.662 MB                | 42.414 MB       |\n\n### XlsxHelper is memory optimized for reading huge xlsx files. see below results for reading [1 Million Employee records](https://excelbianalytics.com/wp/downloads-16-sample-csv-files-data-sets-for-testing/)\n\n|                                               | XlsxHelper | ExcelDataReader |\n|-----------------------------------------------|------------|-----------------|\n| Time to read first row                        | 5ms        | -               |\n| Time to read all rows(1,000,000)              | 102.50 sec | 61.10 sec       |\n| Memory usage at the time of reading first row | 31.920 MB  | 668.381 MB      |\n| Memory usage at the time of reading last row  | 41.103 MB  | 667.934 MB      |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farjunvachhani%2Fxlsxhelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farjunvachhani%2Fxlsxhelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farjunvachhani%2Fxlsxhelper/lists"}