Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Automatically importing a csv file

Posted on 2000-03-21
3
Medium Priority
?
210 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 150 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

721 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