AXForum  
Zurück   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Kennwort vergessen?
Registrieren Forum Rules Hilfe Benutzerliste Heutige Beiträge Suchen

 
 
Themen-Optionen Thema durchsuchen Ansicht
Alt 20.09.2012, 17:11   #1  
Blog bot ist offline
Blog bot
Участник
 
25.646 / 848 (80) +++++++
Registriert seit: 28.10.2006
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, напишите личное сообщение администратору.
 

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
axaptacorner: How to Import CSV files and how make Log files in Ax 2012 through X++ Blog bot DAX Blogs 0 20.09.2012 17:11
axaptacorner: How to create General Journal in AX 2012 by X++ code Blog bot DAX Blogs 0 10.09.2012 23:15
Gareth Tucker: Scribe Insight and Microsoft CRM 2011 Blog bot Dynamics CRM: Blogs 0 06.05.2012 02:18
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
daxdilip: Whats New in Dynamics AX 2012 (A brief extract from the recently held Tech Conf.) Blog bot DAX Blogs 7 31.01.2011 12:35

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Gehe zu

Рейтинг@Mail.ru
Alle Zeitangaben in WEZ +3. Es ist jetzt 23:08 Uhr.
Powered by vBulletin® Version 3.8.5 (Deutsch)
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.