Any tips where to start learning writing script to export to excel

I’ve seen few examples, but there are so many coding around , which I do not know where to start. I just like to learnt a simple step, to export value in 1st column of “view” to cell B2 in excel. it will use a template excel file attaced in the database (maybe profile document).

really appreciates any help on this matter.

Subject: Any tips where to start learning writing script to export to excel

Dim s As New notessessionDim db As NotesDatabase

Dim vw As NotesView

dim doc as NotesDocument

Dim xlApp As Variant, xlsheet As Variant

Dim rw As Integer, cl As Integer

dim vr as variant

Set db = s.CurrentDatabase

set vw = db.GetView(“Your View”)

set doc = vw.GetFirstDocument

Set xlApp = CreateObject(“Excel.application”)

If xlApp Is Nothing Then

Msgbox "Error!!! Agent was unable to open Microsoft Excel."

Exit Sub

End If

xlApp.Visible = True

xlApp.Workbooks.Add

Set xlsheet = xlApp.Workbooks(1).Worksheets(1)

xlsheet.Select

rw = 1

cl = 1

xlsheet.Cells(rw, cl).value = “Excel Column Label1”

xlsheet.Cells(rw, cl+1).value = “Excel Column Label2”

xlsheet.Cells(rw, cl+2).value = “Excel Column Label3”

rw= rw+2

’ If you put it in a loop, these rw & cl will be helpful for incrementing anf filling up the column.

vr = doc.ColumnValues(0) -------> 1st view column value

xlsheet.Cells(rw, cl).value = vr

vr = doc.ColumnValues(1) -----------> 2nd view column value

xlsheet.Cells(rw, cl+1).value = vr

vr = doc.ColumnValues(2) -----------> 3rd view column value

xlsheet.Cells(rw, cl+2).value = vr

Hope this helps.

Subject: Any tips where to start learning writing script to export to excel

Try this…

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/ab6e67673221130685257205006606f3?OpenDocument