Wednesday, May 12, 2010

Reading xls and xlsx files from .NET

Free library to read XLS and XLSX files from .net: 

http://sourceforge.net/projects/koogra/


I thought it deserved a mention :). Written in C# and available with MIT license (aka free for commercial use).

On the commercial front I recommend (you also get to read CSV and fixed column width files reliably from same API) :
http://www.csvreader.com/
They have the full version available for free testing so:
I tested there performance for XLS and XLSX.
For XLS it can load the sample customers sheet with 65536 rows (max allowed :)) in under 1 second
For XLSX it can load 80 thousand in reasonable time  (just wanted to check if it could handle the new row limit extension :) Also, Excel 2007 is not that happy opening this file either ).


There is also gembox spreadsheet. But since they don't have a full featured test version I cannot comment on its performance / my opinion.

Enjoy!