excel interop alternative

A.R. picture A.R. · Aug 9, 2011 · Viewed 11.1k times · Source

I have started using the Excel interop assemblies that are provided by Microsoft for one of my C# applications. Everything is going fine, but there seems to be a lack of strong typing, and honestly it feels like I am writing VBA code. Are there any alternative ways to interact with Excel from C# that would give a better OO experience? I am using VS2010 and .Net 4.0 by the way.

Answer

Fosco picture Fosco · Aug 9, 2011

Take a look at the EPPlus project over at Codeplex:

http://epplus.codeplex.com/

I recently used this and it worked very well. (VS2010 and .Net4)

EPPlus is a .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx).

Nice example page: http://epplus.codeplex.com/wikipage?title=ContentSheetExample