用VB操作Excel 首先创建Excel对象,使用ComObj: Dim ExcelID as Excel.Application Set ExcelID as new Excel.Application 1)显示当前窗口: ExcelID.Visible:=True; 2)更改Excel标题栏: ExcelID.Caption:='应用程序调用MicrosoftExcel';
Dim db As Database, rs As Recordset 打开DBF文件: Set db = OpenDatabase("d:\tmp", False, False, "dbase 5.0") Set rs = db.OpenRecordset("select * from test", dbOpenDynaset) 打开XLS文件: Set db = OpenDatabase("d:\tmp.xls", False, False, "EXCEL 8.0;HDR=Yes;") S