本文介绍了在Dynamics AX中读取逗号分隔值(CSV)文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Dynamics Axe中打开并解析csv文件?

How do you open and parse a csv file in dynamics ax?

推荐答案

static void TestCommaTextIO(Args _args)
{
    #File
    CommaTextIo        commaTextIo;
    FileIOPermission   permission;
    container          containFromRead;
    int                x;
    int                cols;
    ;
    permission = new FileIOPermission('c:\\junk\\mycsv.csv',#io_read);
    permission.assert();

    commaTextIo = new CommaTextIO('c:\\junk\\mycsv.csv','R');

    containFromRead = commaTextIo.read();
    While(containFromRead)
    {
        cols = conLen(containFromRead);
        for(x=1;x<=cols;x++)
        {
            print conpeek(containFromRead,x);
        }
        containFromRead = commaTextIo.read();
    }
    pause;
    commaTextIo = null;
}

这篇关于在Dynamics AX中读取逗号分隔值(CSV)文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 03:16