Sunday, May 8, 2011

Wrting the data to csv file & open in the excel

static void AXtoCSVorExcel(Args _args)
{
    CommaIO     commaIO;
    str         fileName;
    LedgerTable ledgerTable;
    ;
   
    fileName    = WinAPI::getTempPath() + "LeagerAccounts" + ".csv";
    commaIO     = new CommaIO(fileName,"w");
   
    while select ledgerTable
    {
        commaIO.write(ledgerTable.AccountNum,ledgerTable.AccountName);
    }
   
    WinAPI::shellExecute(fileName);
}

No comments:

Post a Comment