Saturday, August 14, 2010

Exporting the data to doc format

static void exportToFile(Args _args)
{
    CommaIO         myFile;
    SqlDictionary   sqlDictionary;
    TableName       tableName;
    LedgerTable     ledgerTable;
    Container       con;
    ;
  
    tablename   = "ledgerTable";
  
    select * from sqlDictionary where tablename2id(tablename) == sqlDictionary.tabId;
  
    if(sqlDictionary.RecId > 0)
    {
        myfile = new CommaIO("C:\\LedgerData.doc","w");
        myfile.outFieldDelimiter("\t"); //Leave spaces for each column
      
        while select ledgerTable
        {
            con = [ledgerTable.AccountNum,ledgerTable.AccountName];
            myFile.writeExp(con);
        }
    }
  
}

No comments:

Post a Comment