title: How to query data in Excel from Visual Studio 2013?
body: <p><strong>Background:</strong></p>
  
  <p>I am transferring data from one Excel document <code>doc0</code> to a templated Excel document <code>doc1</code> to speed up processes at work. My only real restriction is that I cannot modify the document's formatting, so regular VBA is not an option. I can only pull data out of <code>doc0</code> modify it and place it in <code>doc1</code>. I am using Visual Studio 2013 for doing so. </p>
  
  <p><strong>What I need to do is:</strong></p>
  
  <blockquote>
    <ol>
    <li><p>Organize <code>doc0</code> numerically by Col 1 first, then Col 3 second. Then place the top 10 results in a specific cell range in <code>doc1</code>.</p></li>
    <li><p>Get a count for jobs assigned to each worker and return that result to Visual Studio. Worker names are listed in Col 4.</p></li>
    </ol>
  </blockquote>
  
  <p>I know how to query using SQL, but am open to using other functions/languages that can perform the same task. </p>
  
  <p><strong>Question:</strong></p>
  
  <blockquote>
    <p>How can I query the data to perform the actions above?</p>
  </blockquote>
  
  <p>A simple example can be seen with the link below. The blue represents <code>doc0</code>, the red the results to be displayed in <code>doc1</code> and the green is the results that I need to have returned to corresponding textboxes in Visual Studio.</p>
  
  <p><img src="https://i.stack.imgur.com/RXIgT.png" alt="enter image description here"></p>