From: Masaki Suketa Date: 2007-03-28T21:28:36+09:00 Subject: Re: excel is not closed in runtime using excel.Quit() Hello, In message "Re: excel is not closed in runtime using excel.Quit()" on 07/03/28, Ruhul Amin writes: > Dear Dave, > Thx for ur responce. This is my working code.I can not understand how > can I use the single Excel instance for different files. Try the following style. Create single Excel instance out of read_excel method, and call excel.quit out of read_excel method. And, pass the single Excel instance to read_excel method as a argument. def read_excel(excel, file_name) destination_file_name=file_name begin # You should not call WIN32OLE.new('excel.Application') in # read_excel method. # excel = WIN32OLE::new('excel.Application') workbook = excel.Workbooks.Open("#{curdir} .... rescue # You should not call excel.quit # excel.quit in read_excel method. end end excel = WIN32OLE.new('excel.Application') read_excel(excel, file_name) # 100 times call excel.quit Regards