
Using EPPlus or ClosedXML for Excel in C Sharp Projects
Choose between EPPlus and ClosedXML for reading and writing xlsx in C Sharp: licensing, API, performance, formulas and when to use the Open XML SDK instead.
Tag
5 posts

Choose between EPPlus and ClosedXML for reading and writing xlsx in C Sharp: licensing, API, performance, formulas and when to use the Open XML SDK instead.

What System.Text.Json does by default in .NET 9: exact-case names, JsonSerializerDefaults.Web, enum surprises, the 64 level depth limit and duplicate keys.

XmlSerializer writes xsi and xsd namespace declarations and a utf-16 header by default. Remove them, control attributes and lists, and see what it ignores.

Load XML into XDocument, query with LINQ, cast attributes and elements to typed values, handle namespaces, and avoid the culture trap in decimal.Parse.

Read CSV in C# with CsvHelper 33: case-sensitive headers, typed ZIP codes, silent ragged rows, and a de-DE culture that made a total 91 times too big.