Solved

Automatically importing a csv file

Posted on 2000-03-21
3
198 Views
Last Modified: 2013-12-18
Hi,

I have an automatically generated csv file which I need to somehow import into a Notes database on a daily basis. What is the best way to go about this?

Zaphod.
0
Comment
Question by:Z_Beeblebrox
3 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 2640485
Hi

You can use an agent to read the file and create a document with appropriate values.

This method works perfectly because you are the one who knows the format of CSV file and can seperate the values.

There is also another method to do this that is open the csv file in excel. Excel would conver the csv to column seperated values and save this file and import this into the notes view. This needs manual intervention.


Good Luck
~Hemanth
0
 
LVL 7

Author Comment

by:Z_Beeblebrox
ID: 2640495
How do I do file I/O with Lotus script?

Zaphod.
0
 
LVL 1

Accepted Solution

by:
bennyliaw earned 50 total points
ID: 2640517
You can use write a Lotus Script agent to import the file, parse the csv text file, process each line parsed probably by creating new documents. You can then schedule the agent to run daily.

Following is a sample script on how to open and parse the text file.

Dim fileNum As Integer
fileNum% = FreeFile()

Dim txt As String
Dim counter As Integer

counter% = 0

Open "c:\dir\thefile.csv" For Input As fileNum%
Do While Not EOF(fileNum%)
   Line Input #fileNum%, txt$
   counter% = counter% + 1
Loop

Seek fileNum%, 1
Dim i As Integer
For i% = 1 To counter%
   Input #fileNum%, field1, field2, field3, ...
   'Rem process the record, e.g. compose a new document

Next
Close fileNum%

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question