斑竹你终于来了?我等了你好几天了
我在WINCC中的代码是这样写的
Dim objExcelApp
Set objExcelApp = CreateObject("Excel.Application")
objExcelApp.Visible = True
'
'ExcelExample.xls is to create before executing this procedure.
'Replace
with the real path of the file ExcelExample.xls.
objExcelApp.Workbooks.Open "d:\neimeng\Book2.xls"
objExcelApp.Cells(4, 3).Value = ScreenItems("nian1").OutputValue
objExcelApp.ActiveWorkbook.Save
objExcelApp.Workbooks.Close
objExcelApp.Quit
Set objExcelApp = Nothing
运行后可以打开EXCEL,可是没有看到数据在上面显示