title: Excel Interop "FindAll" Method
body: <p>This may be a duplicate question, but really don't know how else to word the title.</p>
  
  <p>Has anyone been able to find a method in the Excel Interop Library that exposes the "Find All" functionality from the "Find and Replace" dialog?</p>
  
  <p>There is Find, FindNext and FindPrevious, but no FindAll, which is odd.</p>
  
  <p>So far, this is the way I'm doing it, my first stab at it, so to speak...</p>
  
  <pre><code>    //FindRange() is an extension method which wraps Worksheet.Cells.Find()
      Range start = sheet.FindRange(searchText, 
                                  XlLookAt.xlPart, 
                                  XlSearchOrder.xlByColumns, 
                                  XlSearchDirection.xlNext);
  
      HashSet&lt;int&gt; matches = new HashSet&lt;int&gt;();
  
      Range next = start;
  
      while (true)
      {
          next = sheet.Cells.FindNext(next.get_Offset(1, 0));
          if (!matches.Add(next.Row))
              break;
      }
  </code></pre>
  
  <p>Any thoughts?</p>