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.

Regards,

Finally I found a simple way :

SysExcelApplication sysExcelApplication;

COM comWindow, comApplication;

sysExcelApplication = SysExcelApplication::construct();

comApplication = sysExcelApplication.comObject();

comWindow = comApplication.activeWindow();

comWindow.splitcolumn(1);

comWindow.splitRow(row);

comWindow.freezePanes(true);