Take the 2-minute tour ×

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

share|improve this question
possible duplicate of Is there a way to use LINQ against Excel? –  Ian Mercer Jan 5 '11 at 6:17

3 Answers 3

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.


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"]
share|improve this answer

Try to obtain data to DataTable or any other collection using OleDb and process collection by LINQ. I can post or send obtaining sources bit later.

share|improve this answer

Your Answer


