0

I'm having trouble, trying to write an Excel Formula in a .xmlx file. The weird part is that with the first Formula in the code segment below it runs perfectly fine. (The Formula is correct, just in German).

With the second im getting the Error Code HRESULT: 0x800A03EC. The Formula is not the Problem since it works when i copy it manually in the Sheet. I've tried the possibly difficult characters, also not the Problem.

The Complete Exception: Ein Ausnahmefehler des Typs "System.Runtime.InteropServices.COMException" ist in mscorlib.dll aufgetreten. Zusätzliche Informationen: Ausnahme von HRESULT: 0x800A03EC

        //string vFormel = "=SUMME(N4+O4+P4+Q4+R4)/S4";
        string vFormel = "=SUMME(WENN(N4 = \"-\";0;N4)+WENN(O4 = \"-\";0;O4)+WENN(P4 = \"-\";0;P4)+WENN(Q4 = \"-\";0;Q4)+WENN(R4 = \"-\";0;R4))";

        try
        {
            vSheet.Range["T4"].Formula = vFormel;
            vSheet.Range["T4", "T56"].FillDown();
        }
        catch (Exception ex)
        {
            vWorkbook.Close(false);
            ExcelApp.Quit();
            throw ex;
        }
PandaSITT
  • 37
  • 6

0 Answers0