What is an alternative to ADO.NET, but elegant way in C# to read Excel files
- by Khnle
ADO.NET just fails miserably when it's used to read Excel files where a column contains mixed data types. It appears that it tries to determine the data type of a column, and then assume the rest of the entire column is of the same data type. Here are some backgrounds:
http://stackoverflow.com/questions/2968111/how-to-prevent-ado-net-from-altering-double-values-when-it-reads-from-excel-files
http://blog.lab49.com/archives/196
What is an alternative approach that doesn't require automation, Excel to be co-installed, is simple (since the input excel file will only have one worksheet in each file).