Read data from Excel file

Code
#WinApi
#File

SysExcelApplication application SysExcelApplication::construct();
SysExcelWorkbooks   workbooks   application.workbooks();
SysExcelWorkbook    workbook;
SysExcelWorksheets  workSheets;
SysExcelWorksheet   workSheet;
SysExcelCells       cells;
SysExcelCell        cell;

if (
workbooks.open(filenamefalse /*Update links*/true /*Read only*/))
{
    
workbook   workbooks.item(1);
    
workSheets workbook.worksheets();
    
workSheet  workSheets.itemFromNum(1);
    
cells      workSheet.cells();

    
cell cells.item(11);
    
info(cell.value().bStr());

    
application.displayAlerts(false);
    
application.quit();
    
application.displayAlerts(true);
}
AX versionMicrosoft Dynamics AX 2009
PropertiesCreated by Alex 2014-12-09 11:47:17 (Public)