发布网友 发布时间:2022-04-21 18:08
共1个回答
热心网友 时间:2023-08-18 01:33
Private Sub Command1_Click()
dim ii as string
Set oleExcel = CreateObject("Excel.Application")
oleExcel.Visible = True
oleExcel.Workbooks.Open FileName:="E:\数据.xls"
oleExcel.Worksheets("Sheet1").Range("A1").Cells(1, 1)="AA"
oleExcel.Worksheets("Sheet1").Range("A1").Cells(2, 2)="BB"
oleExcel.Save
oleExcel.displayalerts = False
oleExcel.Quit
End Sub
'另: 需要引用microsoft activex data objects 2.5 library
microsoft DAO 3.51 object library 赞同