Dim OExcel As Object
    Dim ExcelSheet As Excel.Application
    Dim WS As Worksheet
    Dim StCell As ExlCell
    Dim ExcelArray() As Variant
    Dim i As Integer
    
    If UBound(DataArray) = 0 Then
        MsgBox "当前条件下没有巡更数据!", vbExclamation, "提示"
        Exit Sub
    End If
On Error GoTo Excel_err
    Set OExcel = CreateObject("Excel.Application")
    Set OExcel = Nothing
.....
Excel_err:
    MsgBox "可能您的计算机中没有安装 EXCEL 或者 EXCEL 无法运行,无法生成报表。", vbCritical, "错误"加错误捕捉