static void ExcelIoTest(Args _args)
{
ExcelIo io;
#Excel
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]);
if (!dialog.run())
return;
io = new ExcelIo(dialogFilename.value(), 'r');
setprefix("Excel Import");
while (io.status() == IO_Status::Ok)
{
con = io.read();
info(con2str(con));
}
io.close(); //To quit Excel
}
{
ExcelIo io;
#Excel
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]);
if (!dialog.run())
return;
io = new ExcelIo(dialogFilename.value(), 'r');
setprefix("Excel Import");
while (io.status() == IO_Status::Ok)
{
con = io.read();
info(con2str(con));
}
io.close(); //To quit Excel
}