Показать сообщение отдельно
Старый 20.10.2020, 14:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
dynamicsaxinsight: Read CSV file in X++
Источник: https://dynamicsaxinsight.wordpress....v-file-in-xpp/
==============

Purpose:

The purpose of this blog post is to demonstrate how to read a csv file in X++

Product:

Dynamics AX 2012

Code:

static void MAKReadFile(Args _args) { #File IO io; CustAccount custAccount; Email email; FilenameOpen filename = @"C:\Temp\CustomerContactInfo.csv"; Container record; ; 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(); if (record) { custAccount = conpeek(record, 1); email = conpeek(record, 2); info(strFmt("%1 %2", custAccount, email)); } } }


Источник: https://dynamicsaxinsight.wordpress....v-file-in-xpp/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.