I am running a script in which exporting the datatable is needed after every iteration to keep it updated. But, after some random iterations, I am getting error:
The DataTable.Export(file) operation failed
Cannot open \\172.27.0.66\Tech QA\PA Report Automation\Port_Temp.xls file because it is already open in another application
Line(69):"DataTable.Export("\\172.27.0.66\Tech QA\PA Report Automation\Port_Temp.xls")"
when I hit Retry button, it does not give error again and start working fine. I checked that Port_Temp.xls file is not open and suppose, if it is open, then hitting Retry button would not have worked.
Can anyone please let me know, what may be the cause of this error?
Note: I am running this script on Win XP VM with IE8
Are you performing any other operation after the exporting the DataTable?
I close excel processes and that seems to have fixed my random excel failures
Patience is like bread I say.... I ran out of that yesterday.