Excel.Exe process crashed
Hello All,
I am facing an issue where I am getting this error message that Excel.Exe process crashed in the log message. The thing is I am able to continue with it but it shows an error in log message.
below is the function I am using to create an excel file
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = FALSE
objExcel.DisplayAlerts = FALSE
Set objWorkbook = objExcel.Workbooks.Open(var_ReportFileLocation)
Set objWorksheet = objWorkbook.Worksheets(2)
For iCounter = 0 To oReportDict.Count-1 Step 1
intkeyno=Me.func_GetKeyUsingIndex(iCounter)
arrIndexValue=Split(Me.func_GetItem(intkeyno),";")
objWorksheet.cells(intkeyno,1) =arrIndexValue(0)
objWorksheet.cells(intkeyno,2) =arrIndexValue(1)
objWorksheet.cells(intkeyno,3) =arrIndexValue(2)
objWorksheet.cells(intkeyno,4) =arrIndexValue(3)
'objWorksheet.cells(intkeyno,5) =arrIndexValue(4)
'objWorksheet.cells(intkeyno,6) =arrIndexValue(5)
If lcase(arrIndexValue(3)) = "pass" Then
objWorksheet.cells(intkeyno,4).Interior.ColorIndex = 4
ElseIf lcase(arrIndexValue(3)) = "fail" Then
'strgSummaryStatus=strgSummaryStatus&";"&arrIndexValue(3)
objWorksheet.cells(intkeyno,4).Interior.ColorIndex = 3
End If
If lcase(arrIndexValue(4))="true" Then
objWorksheet.Hyperlinks.Add objWorksheet.cells(intkeyno,5),arrIndexValue(6),,,"Click for ScreenShot"
End if
Next
objWorkbook.Save
set objWorksheet = nothing
set objWorkbook = nothing
objExcel.Application.Quit
set objExcel = nothing
The issue happens as soon excel application is quit, if I remove Excel.Application.Quit then it does not show me an error. I am using .xls file, I tried with .xlsx also but same error.
Any idea on this ?
Regards,
Nimish