What's the best way to read an Excel file into a DataGrid in WinUi 3?

This page summarizes the projects mentioned and recommended in the original post on /r/csharp

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • NPOI

    a .NET library that can read/write Office formats without Microsoft Office installed. No COM+, no interop.

    I use NPOI https://github.com/nissl-lab/npoi its a popular package for reading Excel. It is both faster than interop and free (open source).

  • CsvBenchmarks

    Benchmarks for various .NET libraries.

    I don't want to disparage NPOI, because I'm sure it's great for its primary use-case, which is creating/editing spreadsheets. However, from a performance perspective it is one of the slowest libraries for reading Excel data in .NET. Since the OP seemed to be very concerned about performance and only needs to read data, this probably isn't the best choice.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • Sylvan.Data.Excel

    The fastest .NET library for reading Excel data files.

    You can give my library a try: Sylvan.Data.Excel. You seem to be concerned about performance, so you can be happy to know it is the fastest Excel reader in the .NET ecosystem, by quite a wide margin. It is open source, MIT licensed, and is easy to use (in my biased opinion).

  • TypeGuesser

    Guesses C# data types for untyped string inputs

    I also wrote a package for guessing datatypes for strings too called TypeGuesser. It measures required decimal sizes too to help with column creation if thats helpful (also free and open source) https://github.com/HicServices/TypeGuesser

  • ExcelDataReader

    Lightweight and fast library written in C# for reading Microsoft Excel files

    ExcelDataReader is the way forward. I dont know what you mean when you say??

  • ReadExcelUsingSylvanExample

    Showing issue with user's data when worksheet column's header's have illegal characters(issue with data, not Sylvan), and Sylvan not reading file if first row is empty.

    Here's the repo: repo

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts