To convert table data into CSV Files seperated with commas:

Hi,
Use this code to convert table data into CSV Files seperated with commas.
Below code is used to convert custtable data into CSV file.
static void CsvConvertion(Args _args)
{
#File
CommaTextIo commaTextIo;
FileIOPermission permission;
CustTable custTable;
str fileName = @”D:\3f.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();
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s