Hello All:
Could you please help me to export field value in Symphony spreadsheet? I can export field value in MS Excel but now requirements got changed.
Any hints and help would be greatly appreciated. Thanks.
Hello All:
Could you please help me to export field value in Symphony spreadsheet? I can export field value in MS Excel but now requirements got changed.
Any hints and help would be greatly appreciated. Thanks.
Subject: Export in Lotus Symphony
Here is my code I used to run to export different fields from lotus document to MS Excel…
Dim session As NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Dim view As NotesView
Dim xlFilename As String
Dim row As Integer
Dim col As Integer
Dim Excel As Variant
Dim xlWorkbook As Variant
Dim xlSheet As Variant
Dim username As String
Dim count As Integer
Dim nam As NotesName
Dim docRead As Double
Dim fldList As String
Dim x As Variant
Dim flds As Variant
On Error Resume Next
Set session=New NotesSession
Set db = session.CurrentDatabase
Set dc=db.UnprocessedDocuments
Set doc = dc.GetFirstDocument
Set Excel=CreateObject("Excel.Application")
Excel.visible=False
xlFilename="C:\Admin Request\export.xls"
Excel.Workbooks.Open xlFilename
Set xlWorkbook=Excel.ActiveWorkbook
Set xlSheet=xlWorkbook.ActiveSheet
rows=Excel.ActiveWindow.ActiveCell.Row
'xlSheet.Name="Fidelis Security Systems Appliances and Support"
row=1
xlSheet.Cells(row,1).value="Doc #"
xlSheet.Cells(row,2).value="Title"
xlSheet.Cells(row,3).value="Owner"
xlSheet.Cells(row,4).value="Status"
xlSheet.Cells(row,5).value="PublishDate"
xlSheet.Cells(row,6).value="Product"
While Not (doc Is Nothing)
docRead=docRead+1
Print "Docs read: " & Cstr(docRead) & "..."
row = row + 1
'// The row, of course, is incremented each time so that we write a fresh row with each doc.
xlSheet.Cells(row,1).Value = doc.docNumber(0)
xlSheet.Cells(row,2).Value=doc.Subject
Set nam = session.CreateName(doc.from(0))
xlSheet.Cells(row,3).Value = nam.Abbreviated
xlSheet.Cells(row,4).Value=doc.Status
xlSheet.Cells(row,5).Value=doc.PublishDate
xlSheet.Cells(row,6).Value=doc.Product
Set doc = dc.GetNextDocument( doc )
Wend
xlWorkbook.Close True
Excel.Quit
Set Excel = Nothing
I want to know how can I modify the code which will interact with Lotus Symphony… Thanks both …
Subject: RE: Export in Lotus Symphony
Does Symphony support COM? Somehow I doubt that it does…But if it would, just modify the code to use Symphony’s API calls and DOM. Did you write the code yourself? So you understand exactly what it is doing? Then it should not be too hard to modify it.
If Symphony 8as I suspect) does not support COM, you probably want to look at one of the solutions I posted about on my blog.
Subject: RE: Export in Lotus Symphony
Symphony (and its parent, OpenOffice.org) does support COM on Windows, but in a very Java-ish fashion. Essentially, only the top-level application objects look anything like the usual VBA COM grammar; once you’re into the app, you’re using the Java API in Basic (all object.getThis() and object.setThat() and that sort of thing). I don’t know if IBM has done anything with the documentation, but there was a time when the COM documentation got you to a starting point and then pointed you to the JavaDoc for reference (useless, almost, since the input and return types are different). Careful experimentation is the only way to go, but you can get there. Or you could just use a Java agent.
Subject: Export in Lotus Symphony
When you say “export in Symphony” and “export in Excel”, I assume you mean “export to Symphony” or “export in Symphony format”?
You are a developer, you should be very conscise, you probably know yourself how important that is.
You may want to read this: http://www-10.lotus.com/ldd/nd6forum.nsf/0/410171d83ddba6d485256df100832aba
First of all, how do you currently export the values in Notes documents to Excel? I am describing a few ways below:
http://blog.texasswede.com/export-from-notes-to-excel-3-different-ways/
Why can’t you use the same method in order to create a XLS file and open it in Symphony? I don’t have Symphony installed here right now, so I can’t test it, but i would assume that Symphony can open a HTML table saved in a text file with .XLS extension, or at least open a .CSV file…
Subject: Export in Lotus Symphony
This sample database may be helpful. It contains scripts to export to Symphony