Excel file causes serious error when opened during TestComplete runs
In our TestComplete scripts that we run overnight, a particular script is setup to open Excel spreadsheet and copy its data. It has been running alright until lately when we have noticed an unexpected message when the Excel file is opened. It reads "The document caused a serious error the last time it was opened. Would you like to continue opening it?"
This only happens when TestComplete scripts are run, and so far can't be reproduced by opening the file manually. Is there something that I can do in the scripts to debug the file properties whenever it is opened? I would like to understand what is happening to the file when the scripts are run, and it has been tricky so far.
The issue occurs when the excel workbook is not closed property by terminating the excel application and opening the same file again and the issue is related to excel application. may be try the following solution
The issue occurs when the excel workbook is not closed property by terminating the excel application and opening the same file again and the issue is related to excel application. may be try the following solution
Is it possible that you are opening the file during your scripts but then failing to close it properly? It may be that the "error" being reported is some sort of improper exit or closure of the Excel process in windows. Double check to make sure that, once your script is finished with the Excel spreadsheet, it is closing it properly.
Murugan is basically backing up what I said... your script may be closing Excel... but some thing in the way you are closing it is doing it improperly. Follow that MSN article and see if that helps.