I am creating an excel report in C#. When I add a formula like below, everything works fine:
totalCellFormulaRange.Formula = "=SUM(AH7:AS7)"; //totalCellFormulaRange is a Range object from Microsoft.Office.Interop.Excel
But now when I try to add a formula consisting of an if statement like below,
memberGuidesCellFormaulaRange.Formula = "=IF(LEFT(D7;12)=\"Welcome Pack\";O7*$AQ$4;0)";
then I get this error:
Exception from HRESULT: 0x800A03EC
The above if statement works 100% if typed out in a Excel sheet. It only fails in C# and the exception is thrown right when it hits this line of code.