Lotus Notes FAQ Visit Our Sponsor!

How do you make a comma-delimited ASCII export file?

To make an comma delimited ASCII text file, make a view with one column. This column contains all of the fields to export. Use quotes around each field in case there are commas in the fields.

Here is a sample column formula:

"\"" + ContactSalutation + "\",\"" + @RightBack(ContactName; ", ") + "\",\"" + @LeftBack(ContactName; ",") + "\",\"" + @If(ContactTitle != ""; ContactTitle; "") + "\",\"" + @If(ContactDivision != ""; ContactDivision; "") + "\",\"" + CompanyName + "\",\"" + @If(ContactAddress1 != ""; ContactAddress1; "") + "\",\"" + @If(ContactAddress2 != ""; ContactAddress2; "") + "\",\"" + ContactCity + "\",\"" + ContactSt + "\",\"" + ContactZIP + "\",\"" + @If(CompanyCountry != "USA"; @UpperCase(CompanyCountry); " ") + "\""

The output looks like this:
"Mr.","Bill","Weber","","","ABB C-E Environmental, Inc.","261 Commercial Street","P.O. Box 7050","Portland","ME","04112"," "
"Mr.","Dan","Ryan","Director of Engineering","Cogeneration","Charles T. Main, Inc.","Prudential Center","","Boston","MA","02199"," "

You can either manipulate the Selection formula or the Print Selection to select the data you want.

Here is a a small macro which allows you to name the text file for output:

@Command([FileExport]; "Tabular"; (@Prompt([OKCANCELEDIT]; "Export File"; "Enter the export file name."; "C:\\winword\\out.txt")));
SELECT @All


Applies to Notes Versions: 3
Last Modified: May 1, 1996