NAV DotNet Excel.WorkSheet.ChartObjects

I want to create an Excel file and include a chart from scratch, and I'm using DotNet functions but when trying to get hold of a handle to ChartObjects I get an error:

Exception HRESULT: 0x800A03EC

The C/AL code:

XlApp := XlApp.ApplicationClass;

XlWrkBk := XlApp.Workbooks.Add(-4167);
XlWrkSht := XlApp.ActiveSheet;
XlWrkSht.Name := 'Item Flow Data';

XlChartObjects := XlWrkSht.ChartObjects(Missing); <---- The error occur on this statement?

Does anyone know whats wrong?

I'm working in NAV 2015 version 8.00.37874....


  • DuikmeesterDuikmeester Hoorn, The NetherlandsPosts: 297Member
    Check ChartObjects Object (Excel) sample maybe that will help.
  • krikikriki Posts: 8,866Member, Moderator
    [Topic moved from 'NAV Tips & Tricks' forum to 'NAV Three Tier' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
    NAV TechDays 2020: 19 & 20 November 2020, Antwerp (Belgium)
Sign In or Register to comment.