Is there a free or open source library to read Excel files (.xls) directly from a C# program?
It does not need to be too fancy, just to select a worksheet and read the data as strings. So far, I've been using Export to Unicode text function of Excel, and parsing the resulting (tab-delimited) file, but I'd like to eliminate the manual step.
SpreadsheetGear for .NET is an Excel compatible spreadsheet component for .NET. You can see what our customers say about performance on the right hand side of our product page. You can try it yourself with the free, fully-functional evaluation.
Take.io
Spreadsheet will do this work for you, and at no charge. Just take a look at this.This is what I usually use. It is a little different because I usually stick a AsEnumerable() at the edit of the tables:
as this lets me use LINQ to search and build structs from the fields.
Forgive me if I am off-base here, but isn't this what the Office PIA's are for?
I recommend the FileHelpers Library which is a free and easy to use .NET library to import/export data from EXCEL, fixed length or delimited records in files, strings or streams + More.
The Excel Data Link Documentation Section http://filehelpers.sourceforge.net/example_exceldatalink.html
This is what I used for Excel 2003: