添加引用里的COM的Microsoft Excel 11.0 Object Library
Microsoft Word 11.0 Object Library
再在代码中加入:
IMPORTS EXCEL
dim exapp as excel.application
dim exwbk as excel.workbook
dim exwst as excel.worksheet
if file.exists(filename)then
exapp=ctype(createobject("excel.application"),excel.application)
exwbk=exapp.workbooks.open(filename)
exwst=ctype(exwbk.sheets("sheet1"),excel.worksheet)
End if
这是03中的用法,05中好象不一样。