AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 16.08.2011, 12:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,491 / 846 (79) +++++++
Регистрация: 28.10.2006
daxdilip: CommaTextIO Class How to Export data to .csv file via X++
Источник: http://daxdilip.blogspot.com/2011/08...t-data-to.html
==============

I'm sure many of you out there might have already used this API within AX.

I had a requirement to spit out a .csv file from AX, Looping through Iventory Pricing and On-Hand Data.
And this code snippet from MSDN was handy for the purpose

http://msdn.microsoft.com/en-us/libr...(v=ax.50).aspx

Below sample shows example of how to output the data from CustTable.

#File
CommaTextIo commaTextIo;
FileIOPermission permission;
CustTable custTable;
str fileName = @"C:\test.csv";
;
permission = new FileIOPermission(fileName,#io_write);
permission.assert();
commaTextIo = new CommaTextIo(fileName,#io_write);
while select custTable
{
commaTextIo.write(custTable.AccountNum,custTable.Name);
}
CodeAccessPermission::revertAssert();






Источник: http://daxdilip.blogspot.com/2011/08...t-data-to.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Microsoft Dynamics CRM Team Blog: Creating Custom Sample Data for Microsoft Dynamics CRM 2011 Blog bot Dynamics CRM: Blogs 0 07.01.2011 03:15
xplusplus: How to read data from text (.txt) file with AsciiIo Blog bot DAX Blogs 0 22.11.2010 01:11
Microsoft Dynamics CRM Team Blog: Dynamic Export to Excel feature – How to protect data over the wire Blog bot Dynamics CRM: Blogs 0 27.01.2009 10:05
Microsoft Dynamics CRM Team Blog: Data Migration Manager Tips and Tricks Blog bot Dynamics CRM: Blogs 0 02.09.2008 22:05
Dynamics AX FAQ: How to import and export data in XML format using Axd classes? Blog bot DAX Blogs 0 18.06.2008 20:05

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 20:04.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.