Solved

Automatically importing a csv file

Posted on 2000-03-21
3
205 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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses

626 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