I am looking for some code by which i can generate some graphical reports in Excel. like i need to get some data from lotus notes and have to generate a excel report some graph and that graph have to generate according to lotus notes out put which should be an input for a excel report. plese help me by sending some code i have already search in fourm but did’t get some code abt the same. actully this is my first report which i have to generate in excel so i have’t any idia about please help …
Subject: RE: Help!!looking for some code by which i can generate some graphical reports in Excel.
Try this one it might help u
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim form1 As NotesForm
Dim xlApp As Variant
Dim xlbook As Variant
Dim xlsheet As Variant
Dim ExcelFileName As String
xlAppname="C:\Documents and Settings\992306\Desktop\Fields.xls"
Set xlApp = CreateObject("Excel.application")
xlApp.Workbooks.Open xlAppname
Set xlbook=xlApp.activeworkbook
Set xlsheet=xlbook.worksheets(1)
x=1
Forall form In db.forms
Forall field In form.Fields
x=x+1
xlsheet.cells(x,1).value = form.name
xlsheet.cells(x,2).value = field
Select Case form.GetFieldType(field)
Case AUTHORS : fieldType = "Authors"
Case READERS : fieldType = "Readers"
Case DATETIMES : fieldType = "DateTime"
Case NAMES : fieldType = "Names"
Case NUMBERS : filedType = "Number"
Case RICHTEXT : fieldType = "Rich text"
Case TEXT : fieldType = "Text"
Case 1281 : fieldType = "Attachment"
Case 0 : fieldType = " "
Case Else
fieldType = "Other " & form.GetFieldType(Field)
End Select
xlsheet.cells(x,3).value = fieldType
End Forall
End Forall
xlsheet.name="Field Names"
xlbook.close True
xlApp.quit
Set xlApp = Nothing