Possible Duplicate:
Reading Excel files from C#
I have seen similar post, but mine is more trivial than the others I have seen.
I need to do read the default worksheet from an excel file, and get the first 3 columns of data and import them into my app as in a List
List<MyObj> obj = new List<MyObj>();.
obj.col1 = ...
obj.col2 = ...
obj.col3 = ...
There are no headings in the document just data. Also would be good to have a solution that works for both formats (XLS,XLSX) but if not possible than thats ok.
Also is it different code for XLSX and XLS ?
Im using .NET 2 but if need I could use c# 4
col1data | col2data | col3data
col1data | col2data | col3data
col1data | col2data | col3data
col1data | col2data | col3data
...