Question: how to export table data to excel in ax 2012?
Answer: // intializing classes to export excel. application = SysExcelApplication::construct(); workbooks = application.workbooks(); workbook = workbooks.add(); ... 
// Setting Header values. cell = cells.item(1, 1); cell.value(“HeaderValue1”); font = cell.font(); ... 
// inserting data row wise. while select yourTable. { row++;