Solved

Automatically importing a csv file

Posted on 2000-03-21
3
201 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.

740 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