title: LinqToExcel syntax
body: <p>I am using the LinqToExcel project developed by MIT and hosted on Google Code at <a href="http://code.google.com/p/linqtoexcel/wiki/UsingLinqToExcel" rel="nofollow noreferrer">http://code.google.com/p/linqtoexcel/wiki/UsingLinqToExcel</a>.</p>
  
  <p>It seems pretty straight forward and elegant. I was able to rewrite a method that used the MS excel interop library and the code was about 1/3 the size.</p>
  
  <p>However, I ran into an issue with trying to query a range of cells. VS2008 picks it up as a syntax error:</p>
  
  <pre><code>   //These lines are fine
     IEnumerable&lt;string&gt; names = new List&lt;string&gt;();
     var excel = new Excel.ExcelQueryFactory(_excelFilePath);
  
     //This line shows a syntax error starting from c[0]
      names = from c in excel.WorksheetRange("A1", "AI1", headerName)
                  c[0] == "IN"
                  select c;
  </code></pre>
  
  <p>The line - c[0] == "IN" - just seems strange. This should grab the value in cell A1. If I remove "c[0] ==IN" The syntax error goes away, but it returns no results.</p>
  
  <p>Is this syntax correct? Is the code on the linked page C#?</p>
  
  <hr>
  
  <p>UPDATE: After getting some answers, it seems the missing "Where" is indeed a typo. However, even with the "where" I couldn't get c[4] == "IN" to return cell A5. I was able to accomplish what I needed to by removing the entire where clause, which returned me the entire range specified. In the initial post, I was just trying to return a singe value - baby steps :)</p>
  
  <p>For the sake of marking an answer - how would I return just one cell in the range? Perhaps the <code>== "IN"</code> is some sort of typo, and not an actual construct of LinqToExcel?</p>
  
  <p>Thanks for your help!</p>