Hi can anyone help me i create an agent to export the document as well as add the document to excel it is working fine but the things is that for eg. in view if the marks is 2.66 then it is displaying fine but it is adding only 2 but not the .66 so i need all your help here is an agent
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim uiview As NotesUIView
Dim ws As New NotesUIWorkspace
Dim collection As NotesDocumentCollection
Dim column As NotesViewColumn
Set db=session.currentDatabase
Print "Please Wait as the Excel Spreadsheet is being created..."
Set view=db.GetView("transfer")
Set doc=view.GetFirstDocument
Dim rownum As Integer,currentdocnum As Long
rownum = 4
currentdocnum=1
Dim xlapp,xlWork
Set xlapp = CreateObject( "Excel.Application" )
xlapp.Workbooks.add
Set xlWork = xlapp.ActiveWorkbook
xlapp.visible=True
xlWork.worksheets("Sheet1").cells(2, 5).value="Transfer to Excel"
xlWork.worksheets("Sheet1").cells(2, 5).Font.Size=14
xlWork.worksheets("Sheet1").cells(2, 5).Font.ColorIndex=10
xlWork.worksheets("Sheet1").cells(2, 5).Font.Bold = True
xlWork.worksheets("Sheet1").cells(3,1).font.bold = True
xlWork.worksheets("Sheet1").cells(3,1).columnwidth = 25
xlWork.worksheets("Sheet1").cells(3,1).value = "Name"
xlWork.worksheets("Sheet1").cells(3,2).font.bold = True
xlWork.worksheets("Sheet1").cells(3,2).columnwidth = 25
xlWork.worksheets("Sheet1").cells(3,2).value = "Phno"
xlWork.worksheets("Sheet1").cells(3,3).font.bold = True
xlWork.worksheets("Sheet1").cells(3,3).columnwidth = 25
xlWork.worksheets("Sheet1").cells(3,3).value = "Marks"
Dim b As Variant
Dim phtot As Long
Dim martot As Long
phtot = 0
martot = 0
While Not (doc Is Nothing)
xlWork.worksheets("Sheet1").cells(rownum,1).value = doc.name(0)
xlWork.worksheets("Sheet1").cells(rownum,2).value =doc.phno(0)
xlWork.worksheets("Sheet1").cells(rownum,3).value =doc.marks(0)
phtot = phtot + doc.phno(0)
martot = martot + doc.marks(0)
Set doc=view.GetNextDocument(doc)
rownum=rownum+1
Wend
xlWork.worksheets("Sheet1").cells(rownum,2).font.bold = True
xlWork.worksheets("Sheet1").cells(rownum,2).Font.ColorIndex=3
xlWork.worksheets("Sheet1").cells(rownum,3).font.bold = True
xlWork.worksheets("Sheet1").cells(rownum,3).Font.ColorIndex=3
xlWork.worksheets("Sheet1").cells(rownum,2).value = phtot
xlWork.worksheets("Sheet1").cells(rownum,3).value = martot
End Sub