code:
Dim ExcelApp As Excel.Application
On Error Resume Next
Set ExcelApp = GetObject(, "Excel.Application")
If Err <> 0 Then
Set ExcelApp = CreateObject("Excel.Applicationn")
End If
Dim FilePath As String
Dim Objxcel As Workbook
FilePath = ThisDrawing.Utility.GetString(1, "请输入Excel表格所在路径:")
Set ObjExcel = ExcelApp.Workbooks.Open(FilePath)
ObjExcel.Activate
Dim ExcelData As Double
ExcelApp.Range("A1").Select
ExcelData = ExcelApp.ActiveCell.Value
……