Reputation: 97
Can Anyone suggest me which method (freefile or ole object creation) is Efficient to export lotus notes documents to CSV and Excel files?
Upvotes: 0
Views: 14956
Reputation: 97
i used formula as well to export as csv & excel.
@Command([FileExport]; "Comma Separated Value"; "c:\text.csv")
Upvotes: 3
Reputation: 97
i got the below simple code for exporting CSV files.
fileNum% = Freefile()
Open filename For Output As fileNum%
' use the view column titles as the CSV headers
Forall c In view.Columns
If cns = "" Then
cns = c.title
Else
cns = cns + +"," + c.title
End If
End Forall
Print #fileNum%, cns
' now get and print the values for each row and column
Set vc = view.AllEntries
Set entry = vc.GetFirstEntry()
While Not entry Is Nothing
rowstring = ""
Forall colval In entry.ColumnValues
If rowstring = "" Then
rowstring = colval
Else
rowstring = rowstring + +"," + colval
End If
End Forall
Print #fileNum%, rowstring
Set entry = vc.GetNextEntry(entry)
Wend
Close fileNum%
Upvotes: 0