Solved

Automatically importing a csv file

Posted on 2000-03-21
3
196 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
Comment Utility
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
Comment Utility
How do I do file I/O with Lotus script?

Zaphod.
0
 
LVL 1

Accepted Solution

by:
bennyliaw earned 50 total points
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses 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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

728 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now