CSV Import Script and Export Script

Mindwatering Incorporated

Author: Tripp Black

Created: 09/24/2010 at 09:50 PM

 

Category:
Notes Developer Tips
LotusScript

Mostly completed LotusScript code for doing an import to input new documents from a CSV file.
Uses the MW FileUtils/FileHandling Script Library (whose functions have partly been added as needed).

CSV-ImportExample.txtCSV-ImportExample.txt

Sample complete LotusScript code that exports all documents with all fields in the document (NotesForm object) from a lookup view.
To use simply update a few variables saying what form, what view to use, and the path to export the CSV file.

MWCSVExport.rtfMWCSVExport.rtf

Sample Group Export.
The script below is used to lay down files to export group lists for import into a mail gateway that cannot do LDAP but just has an approved list of e-mails. This first script has a column for the group name and group e-mail address. This is one half of the list for the mail gateway (the groups). The other half is a variant of this code that walks the User/People view. (Needed CSV file handling functions have been pasted into this sample LotusScript from the MW FileHandling / FileUtils script library.)

GroupEmailExportCSV.rtfGroupEmailExportCSV.rtf

The script below also exports groups for audit or integration purposes to CSV format. In this case, we are are exporting the view name, view description, view type (0, 1, 2, etc), and members separated by semi-colons.
GroupMembershipExport.txtGroupMembershipExport.txtGroupMembership E-mail CSV Export.txtGroupMembership E-mail CSV Export.txt





previous page