title: POI / Excel : applying formulas in a "relative" way
body: <p>I'm using Apache's POI to manipulate Excel (.xls) files with Java. </p>
  
  <p>I'm trying to create a new cell whom content is the result of a formula as if the user had copied/pasted the formula (what i call the "relative" way, as opposite to "absolute").</p>
  
  <p>To make myself clearer, here is a simple example: </p>
  
  <ul>
  <li>Cell A1 contains "1",B1 contains "2", A2 contains "3", B2 contains "4".</li>
  <li>Cell A3 contains the following formula "=A1+B1".</li>
  </ul>
  
  <p>If I copy the formula to the A4 cell under excel, it becomes <code>"=A2+B2"</code> : excel is adapting the content of the formula dynamically. </p>
  
  <p>Unfortunately I cannot get the same result programatically. The only solution I found is to tokenize the formula and do the dirty work myself, but I really doubt that this is supposed to be done that way. I was not able to find what I'm looking for in the guides or in the API.</p>
  
  <p>Is there an easier way to solve this problem ? If it's the case, can you please point me in the right direction ? </p>
  
  <p>Best regards, </p>
  
  <p>Nils</p>