vendredi 4 février 2011

How to write in a CSV file from X++

Use this code :)

static void Classes_CommaIo(Args _args)
{
    CommaIo     fileOut;
    FileName    fileName = "c:\\Customers.csv";
    CustTable   custTable;
;
    #File

    fileOut = new CommaIo(filename, #io_write);

    if (fileOut)
    {
        while select custTable
        {
            fileOut.write(custTable.accountNum,
                              custTable.name,
                              custTable.custGroup,
                              custTable.currency);
        }
    }
}

Happy Daxing!

Aucun commentaire:

Publier un commentaire