hi i have a c# program which gives the excel2007 range, its formulaarray as follows
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 = "=(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))))))";
it gives me exception saying that formula is wrong... but if open excel-2007 and in a new sheet (let's say sheet5) select the range A1:HM232 and paste the above formula directly to the formula bar, and then press the Ctrl+Shift+Enter together it does everything fine,... plz can you tell me how to do the same with the c#?
i am aware that if i use formulaarray to use the R1C1 style, but if i use the
"=ROUND((IF(Sheet4!A1:HM232=1,0,"+
"IF(Sheet4!A1:HM232=0,1,Sheet4!A1:HM232))),0)"
it gives me no exceptions and it performs it as if i did Ctrl+Shift+Enter, both from c# and excel directly
for the above two formulas i did change the A1:HM232 to R1C1:R232C221 again shorter one works fine from c# but the longer one does not!