Langsung ke konten utama

Postingan

Menampilkan postingan dari Mei, 2016

Create an Excel File using X++

Create an Excel File using X++ Creating an excel file is essential mostly in data import or export. Microsoft Dynamics AX has a feature to import and export through excel template. But in some cases, you need to create an excel to integrate with other application. Below is an example of creating an excel file in X++ using an existing table in AX. static void ExportToExcel(Args _args) { #AviFiles SysOperationProgress progress = new SysOperationProgress(); SysExcelApplication sysExcelApplication; SysExcelWorkbooks sysExcelWorkBooks; // Filename to which you will be writing your data FileName fileName = "C:\\Windows\\Temp\\ExportToExcel.xlsx"; SysExcelWorkbook sysExcelWorkBook; SysExcelWorkSheets sysExcelWorkSheets; SysExcelWorkSheet sysExcelWorkSheet; SysExcelWorkSheet sysExcelWorksheetBackOrder; SysExcelWorksheet sysExcelWorkSheetToBeDeleted; SysExcelStyles