title: Transforming XML into MS Excel XML - formula syntax
body: <p>I am transforming some XML to view in MS Excel. There is a very good reference on how to create the schema - <a href="http://msdn.microsoft.com/en-us/library/aa140066(v=office.10).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/aa140066(v=office.10).aspx</a>. This <a href="http://www.openscope.net/2010/02/09/transforming-xml-into-ms-excel-xml/" rel="nofollow">blog</a> is also useful.</p>
  
  <p>I am having trouble inserting a formula into a cell, so:
      <code>&lt;Cell ss:Index="2" ss:Formula="=SUM(R[-3]C[0]:R[-1]C[0])"&gt;</code> 
           <code>&lt;Data ss:Type="Number"&gt;&lt;/Data&gt;</code>
         <code>&lt;/Cell&gt;</code>
  is pretty straightforward. This will sum the values in the row 3 rows above to the row 1 above.</p>
  
  <p>However, the formula I need (in A1 style format, rather than R1C1) is <strong><code>=SUMIF(A:A,"Assignments",B:B)</code></strong>.</p>
  
  <p>I have tried many options, including </p>
  
  <ul>
  <li><p><code>ss:Formula="=SUMIF(C[-1]:C[-1],Assignments,C[0]:C[0])"</code> but the definition of the cell equals <strong><code>=SUMIF(A:A,Assignments,B:B)</code></strong> in this case.</p></li>
  <li><p><code>ss:Formula="=SUMIF(C[-1]:C[-1],"Assignments",C[0]:C[0])"</code> but the workbook becomes corrupt and won't open. </p></li>
  <li><p><code>ss:Formula="=SUMIF(C[-1]:C[-1],'Assignments',C[0]:C[0])"</code> but the definition of the cell equals <strong><code>0</code></strong> in this case. </p></li>
  </ul>
  
  <p>The quotation marks are causing a problem. Does anyone know the correct syntax to get the required formula insert into a cell?</p>