title: Parsing and extracting cell references from Excel formulas?
body: <p>I am looking to parse and extract cell references from Excel formulas. Let's say I have the following formula inside cell <code>P5</code>:</p>
  
  <pre><code>=SUM(P1:P4)+Q3
  </code></pre>
  
  <p>I am looking for an output of the location of the cells involved for the formula to produce an answer, i.e. <code>P1</code>, <code>P2</code>, <code>P3</code>, <code>P4</code>, <code>Q3</code> as output (their location/representation in some other form is acceptable too).</p>
  
  <p>My question is whether there is such kind of parser available to accomplish this and if not, what technique I should adopt. Perhaps the formula I have listed as example is quite simple, I would ideally like to cover all potential formulas, maybe even those that have a reference across other sheets and workbooks. I expected and was really hoping for a VSTO C# based solution but I'm having a really difficult time finding one or even relevant functionality in the VSTO library.</p>