hi, can anyone tell me why this does not work
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)";
but this does
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)";
=======================================================
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!
=======================================================
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!