title: c# excel range.FormulaArray, if you have time can you try below c# program with two different FormulaArrays
body: <p>can anyone tell me why this does not work</p>
  
  <pre><code> Excel.Worksheet ws_res = (Excel.Worksheet)
                    wb.Worksheets.Add(mis, mis, mis, mis);
    Excel.Range range_res = (Excel.Range)ws_res.get_Range("A1","HM232");
   range_res.FormulaArray = 
             "=ROUND((IF((IF(Sheet4!A1:HM232=1,0,"+
             "IF(Sheet4!A1:HM232=0,1,Sheet4!A1:HM232)))=1,0,"+
             "IF((IF(Sheet4!A1:HM232=1,0,"+
             "IF(Sheet4!A1:HM232=0,1,Sheet4!A1:HM232)))=0,1,("+
             "IF(Sheet4!A1:HM232=1,0,"+
             "IF(Sheet4!A1:HM232=0,1,Sheet4!A1:HM232)))))),0)";
  </code></pre>
  
  <p>but this does</p>
  
  <pre><code>   Excel.Worksheet ws_res = (Excel.Worksheet)
                    wb.Worksheets.Add(mis, mis, mis, mis);
    Excel.Range range_res = (Excel.Range)ws_res.get_Range("A1","HM232");
    range_res.FormulaArray = 
    "=ROUND((IF(Sheet4!A1:HM232=1,0,IF(Sheet4!A1:HM232=0,1,Sheet4!A1:HM232))),0)";
  </code></pre>
  
  <p>=======================================================</p>
  
  <p>but if i copy and paste the above two formulas to the formula bar of excel-2007 and press Ctrl+Shift+Enter, both work perfectly!</p>
  
  <p>=======================================================</p>
  
  <p>i have also changed in the above two formulas A1:HM232 to R1C1:R232C221, again from c# the shorter one works fine, but the longer one still generates the exception!</p>