How to read an Excel file
In this post, i will explain how to read an Excel file and write data from rows into AX system. Below job opens a dialog box and lets the user to select an excel file and then reads the excel starting from first row and transfers the cell data to a variable in Axapta. When the excel finished, application quits. static void readFromExcel (Args _args) { SysExcelApplication application; SysExcelWorkbooks workbooks; SysExcelWorkbook workbook; SysExcelWorksheets worksheets; SysExcelWorksheet worksheet; SysExcelCells cells; COMVariantType type; CommaIO comio; Container line; FileName filename; int row; ItemId exItemId; ItemName exItemName; Dialog dialog = new Dialog( "Select File and Path" ); DialogField DFPath; ; application...