Dim xlsApp As Object
Dim objWorkbook As Object
Set xlsApp = CreateObject("excel.application") ,使用创建对象的方式,而不是NEW
'Set xlsApp = New excel.Application '如果使用NEW关键字创建EXCEL对象必须引用库
xlsApp.Visible = True
Set objWorkbook = xlsApp.workbooks.Add
objWorkbook.worksheets("sheet1").cells(1, 1) = "标题"