Thanks for reply, i have implemented using the R1C1 formula for the above code its working fine
string
r1c1formula = "=IF(RC[-20]<>\"\",LEFT(RC1&\" \",30)&\" \"&TEXT(DAY(RC3),\"00\")&\"/\"&TEXT(MONTH(RC3),\"00\")&\"/\"&TEXT(YEAR(RC3),\"0000\")&\" \"&IF(RC5=\"\",\"N\",TEXT(RC5,\"0\"))&\" \"&TEXT(RC7,\"00\")&\".\"&TEXT(RC8,\"00\")&\" \"&TEXT(RC10,\"00\")&\".\"&TEXT(RC11,\"00\")&\" \"&TEXT(RC13,\"00\")&\".\"&TEXT(RC14,\"00\")&\" \"&TEXT(RC16,\"00\")&\".\"&TEXT(RC17,\"00\")&\" \"&RC4&\" \"&TEXT(RC19,\"00\")&\".\"&TEXT(RC20,\"00\"),\"\")";
for (int row = startRow; row <= endRow; row++)
{
sheet.Cells[row, 20].R1C1Formula = r1c1formula;
}
***************************************
but i have another similar kind of formula that i need to implemented in C#, its working fine in EXCEL, but while using R1C1Formula in C# using Aspose its giving error:
string
r1c1formula = "=LEFT(RC3&\" \",30)&\" \"&LEFT(RC1&\" \",3)&\" \"&RC[-4]&\" \"&TEXT(RC6*100,\"0000000000 \")&TEXT(RC8*100,\"0000000000\")&\" 0000000000 \"&TEXT(DAY(R7C4),\"00\")&\"/\"&TEXT(MONTH(R7C4),\"00\")&\"/\"&TEXT(YEAR(R7C4),\"0000\")&\" 00.00 \"&R6C4";
for (int row = 12; row <= maxRow; row++)
{
sheet.Cells[row, 8].R1C1Formula = r1c1formula;
}
Please find the attached test file that i am testing...and column 9 (resultvalues) shows the formula results.
can any one please advise on this?