'dim session As New NotesSession
Dim GSess As NotesSession '当前工作区
Dim GdbCur As NotesDatabase '当前数据库
'Dim Ldoccur As notesdocument
Dim curdoc As notesdocument '当前IE的文档
Dim xlApp As Variant 'Excel.Application
Dim xlBook As Variant 'Excel.Workbook
Dim xlSheet As Variant 'Excel.Worksheet
Set xlApp = CreateObject("Excel.Application")
Set xlBook = Nothing
Set xlSheet = Nothing
dim xlapp as Variant
dim xlbook as Variant
dim xlsheet as Variant
...
set xlapp=CreateObject("Excel.Application")
if isempty(xlapp) then
print "服务器不能创建Excel表"
exit sub
end if
xlapp.visible=False
set xlbook=xlapp.workbooks.add 'add也可以是open 打开一个已经存在的.xls
set xlsheet=xlbook.sheets(1)
xlsheep.cells(i,j).value=... '对excel的数据项赋值
...