Raj pal wrote in post #1084536:
> Hi Joel Pearson
>
> please look at this error,
>
> [15:51:13] [ERROR] : Error attaching: excelOpen: false , fileOpen:
> false, file:
> C:\work1\IDITTestAutomationProject\TestData\TestData_MyCopy.xls error:
> Open
>     OLE error code:800A03EC in Microsoft Office Excel
>       'TestData_MyCopy.xls' cannot be accessed. The file may be
> corrupted, located on a server that is not responding, or read-only.
>     HRESULT error code:0x80020009
>       Exception occurred.
> Open
>     OLE error code:800A03EC in Microsoft Office Excel
>       'TestData_MyCopy.xls' cannot be accessed. The file may be
> corrupted, located on a server that is not responding, or read-only.
>     HRESULT error code:0x80020009
>       Exception occurred.
>
>
> I encounter this error so often, I haven't opened any Excel file during
> execution, But still i am encountering this error, what is the reason ?
> But if I close the eclipse and open again then this won't be coming.How
> to solve this error without closing the eclipse?
>
> Raj

You may have crashed out without closing the process which is accessing 
the file. In that case, you might have an invisible process locking the 
file which is being terminated when you close Eclipse.
Have a look at this for example:

____________________________________________
begin
excel = WIN32OLE::new("excel.application")
#Do some stuff where excel might crash
rescue
excel.Quit()unless excel.nil?
end
____________________________________________

Within that code, if you experience an error inside the begin/end block, 
excel will close and therefore stop locking whichever file it's 
accessing. You should probably do the same type of exception-based 
garbage collection with any object which might lock files.

-- 
Posted via http://www.ruby-forum.com/.