I like to extract data from excel sheet using linq, I saw ExcelqueryFactory for this on some sites. I don't know namespaces or links for this. I am using framework.net3.5 (visual studio2008). Is it possible to use it in .net3.5
I think ExcelQueryFactory belongs to the .NET Framework 4.0. We need to enable dll to access this class in .net3.5. From under the link we can get it.
http://code.google.com/p/linqtoexcel/source/browse/trunk/src/LinqToExcel/ExcelQueryFactory.cs?r=50
The below code example shows how we extract from Excel using ExcelQueryFactory
var book = new ExcelQueryFactory("pathToExcelFile"); var australia = from x in book.Worksheet() where x["Country"] == "Aust" select new { Country = x["Country"], BookCode = x["Code"], BookName = x["Name"] };
Check it out: Retrieving data from Excel using LINQ
Try to get data into a DataTable or any other collection using OleDb and the LINQ process collection. I can send or send the source bit later.