Ismael Oliveira

Ismael Oliveira

  • 2.1k
  • 82
  • 2.7k

In C# can't introduce a formula in Excel

Jul 27 2022 10:39 PM

I use C# in Visual studio 2022 (in portuguese) and I have a form solution where I open an Excel file and introduce data. In one cell I have to put a formula: "=IF(H5=0;D5;H5)". When I do this I receive an error: System.Runtime.InteropServices.COMException: 'Exceção de HRESULT: 0x800A03EC'. For simple formulae, like "=B4*C4", it works fine. The error is the same wheter the formula is in portuguese or english. Does anyone know what is hapening? Thanks.

Answers (1)