Set objExcelApp = CreateObject(\"Excel.Application\") objExcelApp.Visible = True ' Dim NO
Set NO = HMIRuntime.Tags(\"NO\") Dim TrackNO
Set TrackNO = HMIRuntime.Tags(\"TrackNO\") Dim Company
Set Company = HMIRuntime.Tags(\"Company\") Dim SheetNO
Set SheetNO = HMIRuntime.Tags(\"SheetNO\") Dim Product
Set Product = HMIRuntime.Tags(\"Product\") Dim SetPoint
Set SetPoint = HMIRuntime.Tags(\"SetPoint\")
objExcelApp.Workbooks.Open\"D:\\UCC\\data\\Book1.xls\" NO.Value = objExcelApp.Cells(2,1).Value TrackNO.Value = objExcelApp.Cells(2,2).Value Company.Value = objExcelApp.Cells(2,3).Value SheetNO.Value = objExcelApp.Cells(2,4).Value Product.Value = objExcelApp.Cells(2,5).Value SetPoint.Value = objExcelApp.Cells(2,6).Value
objExcelApp.ActiveWorkbook.Save
objExcelApp.Workbooks.Close objExcelApp.Quit
Set objExcelApp = Nothing
NO.Write TrackNO.Write Company.Write SheetNO.Write Product.Write SetPoint.Write
因篇幅问题不能全部显示,请点此查看更多更全内容