Creates Excel file in X++

Hello everybody,

I have a requirement on creating an Excel file from X++.

I have to freeze rows and columns.

I’ve searched a way to do this with SysExcel classes and Excel COM object and i didn’t find it.

Please can anyone give me advices ?

I’m working with AX 2012 R2.

Thanks in advance.


Finally I found a simple way :

SysExcelApplication sysExcelApplication;

COM comWindow, comApplication;

sysExcelApplication = SysExcelApplication::construct();

comApplication = sysExcelApplication.comObject();

comWindow = comApplication.activeWindow();