|
20.09.2012, 17:11 | #1 |
Участник
|
axaptacorner: How to read CSV files in AX 2012 through X++ code
Источник: http://axaptacorner.blogspot.com/201...n-ax-2012.html
============== Through following code we can read CSV files static void ReadCsvFile(Args _args) { #File IO iO; CustAccount custAccount; CustName custname; FilenameOpen filename = "d:\\jit.csv";//To assign file name Container record; boolean first = true; ; iO = new CommaTextIo(filename,#IO_Read); if (! iO || iO.status() != IO_Status::Ok) { throw error("@SYS19358"); } while (iO.status() == IO_Status::Ok) { record = iO.read();// To read file if (record) { if (first) //To skip header { first = false; } else { custAccount = conpeek(record, 1);//To peek record custname = conpeek(record, 2); info(strfmt('%1--%2',custAccount,custname)); } } } } Happy X++ coding!!! Источник: http://axaptacorner.blogspot.com/201...n-ax-2012.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|