Axaptapedia is now maintained by AgileCadence For more information please click here.

Difference between revisions of "ExcelIo"

From Axaptapedia
Jump to: navigation, search
Line 5: Line 5:
[[Image:Class_ExcelIo.xpo| XPO file for Axapta 3.0 and up]]
[[Image:Class_ExcelIo.xpo]] XPO file for Axapta 3.0 and up
==How to use==
==How to use==

Revision as of 09:30, 28 July 2011


To read an Excel file in way mimicking CommaIo.

The writeExp method is not implemented.


File:Class ExcelIo.xpo XPO file for Axapta 3.0 and up

How to use

Just use ExcelIo as a replacement for CommaIo

<xpp> static void ExcelIoTest(Args _args) {

   ExcelIo io;
   dialogField dialogFilename;
   Dialog dialog = new Dialog("Excel Upload");
   container con;
   dialogFilename = dialog.addField(typeId(FilenameOpen));
   dialog.filenameLookupTitle("Upload from Excel");
   dialog.filenameLookupFilter(["@SYS28576",#XLSX, "@SYS28576",#XLS]);
   io = new ExcelIo(dialogFilename.value(), 'r');
   setprefix("Excel Import");
   while (io.status() == IO_Status::Ok)
       con =;

} </xpp>