title: Cells.Formula="=CONCATENATE(...)" Exception 0x800A03EC
body: <p>I'm writing a VB.NET application that generates an Excel file.</p>
  
  <p>My intention here is to write a particular formula that uses <code>CONCATENATE</code> in a cell.</p>
  
  <p>Now, the following line of code fires the above exception:</p>
  
  <pre><code>0) tSheet.Cells(tIncRow + ItemIndex * PixelIndex + PixelIndex, 2).Formula = 
     "=CONCATENATE(" &amp; Pixels(PixelIndex) &amp; ";Batches!J3)"
  </code></pre>
  
  <p>The following row does NOT raise the exception. (It's simply the row above without the <code>=</code> at the beginning. The fact that it doesn't raise the exception means that the indexes are used properly; I'll get rid of them in the following passages to ease the notation). Also, if I manually put in Excel an <code>=</code> in front of the very same formula, then the formula gives a correct result (it correctly grabs <code>Batches!J3</code>)</p>
  
  <pre><code>1) tSheet.Cells(tIncRow + ItemIndex * PixelIndex + PixelIndex, 2).Formula = 
     "CONCATENATE(" &amp; Pixels(PixelIndex) &amp; ";Batches!J3)"
  </code></pre>
  
  <p>The following line also runs without problem:</p>
  
  <pre><code>2) tSheet.Cells(indexes).Formula = "=CONCATENATE(" &amp; Pixels(PixelIndex) &amp; ")"
  </code></pre>
  
  <p>This line works as well:</p>
  
  <pre><code>3) tSheet.Cells(indexes).Formula = "=CONCATENATE(Batches!J3)"
  </code></pre>
  
  <p>It seems that only the combination of 2) and 3) raises the exception.</p>
  
  <p>I'm using Visual Studio 2012, Excel 2007, and I'm including Microsoft Excel 12.0 Object Library</p>
  
  <p>Thanks for any help!</p>