srinivas

srinivas

  • NA
  • 153
  • 167k

Retreive data from Excel Sheet using LINQ

Jan 12 2010 6:47 AM

hi to all
i want to retreive data from excel sheet using LINQ
 
now i am using  for loops like this to retreive data
range = xlWorkSheet.UsedRange;
int bid = 0;
for (row = range.Rows.Count; row >= 2; row--)
{
if (int.Parse(((Excel.Range)range.Cells[row, 3]).Value2.ToString()) == libObj.CategoryId)
{
bid = int.Parse(((Excel.Range)range.Cells[row, 1]).Value2.ToString());
break;
}
}
instead of using like this is there any other way using LINQ
 
plz help me
 
thankx

Answers (1)