I like to retrieve the data from excel sheet using linq, I saw ExcelqueryFactory for that in some sites. I don't know the namespace or reference for that. I am using .net3.5 framework(visual studio2008). Is it possible to use it in .net3.5
I think ExcelQueryFactory come from .net framework 4.0 . We need to inculde dll for access that class in .net3.5.From below link we can get that.
http://code.google.com/p/linqtoexcel/source/browse/trunk/src/LinqToExcel/ExcelQueryFactory.cs?r=50
Below example code show how we retrieve 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"]
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With