O'Reilly logo

Microsoft Dynamics AX 2009 Development Cookbook by Mindaugas Pocius

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reading Excel files

Reading Excel files is another side of Excel file manipulation. It is equally important as file creation. Usage could vary from importing simple data to processing user-filled files like timesheets, purchase orders, etc.

In this recipe, we will use the file created in the previous recipe. We will read customer data using SysExcel classes and will show it on the screen.

How to do it...

  1. In AOT, create a new class called ReadExcelFile with the following code:
    class ReadExcelFile
    
    {
    }
    public static void main(Args args)
     { SysExcelApplication application; SysExcelWorkbooks workbooks; SysExcelWorkbook workbook; SysExcelWorksheets worksheets; SysExcelWorksheet worksheet; SysExcelCells cells; COMVariantType type; int row; CustAccount ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required