C# excel converting A1 formula to R1C1

c++excel-2007

2007 formula written with A1 style, how is it possible to convert the A1 style formula to R1C1 in c# so that later on i can use it for range.FormulaArray=…

in documentation it says that FormulaArray should be given in R1C1 style…

for example this one

 "=ROUND((IF(Sheet4!A1:HM232=1,0,"+
             "IF(Sheet4!A1:HM232=0,1,Sheet4!A1:HM232))),0)"

i want to perform not operation on a matrix, at the end i will have the 0s and 1s replaced in a matrix… in excel -2007 i would select the range and press the Ctrl+Shift+Enter!

Best Solution

Use the Application.ConvertFormula function.