[#30549] [ANN] Ruby 1.8.6 has been released — "Akinori MUSHA" <knu@...>

 Ruby 1.8.6 をリリースしました。

14 messages 2007/03/12

[#30553] help: lib/shell for ruby 1.9 — keiju@... (Keiju ISHITSUKA)

けいじゅ@いしつかです.

13 messages 2007/03/13
[#30585] Re: help: lib/shell for ruby 1.9 — Yukihiro Matsumoto <matz@...> 2007/03/15

まつもと ゆきひろです

[#30587] Re: help: lib/shell for ruby 1.9 — keiju@... (石塚圭樹) 2007/03/15

けいじゅ@いしつかです.

[#30588] Re: help: lib/shell for ruby 1.9 — Yukihiro Matsumoto <matz@...> 2007/03/15

まつもと ゆきひろです

[ruby-dev:30678] Re: excel is not closed in runtime using excel.Quit()

From: "Md. Ruhul Amin" <amin@...>
Date: 2007-03-29 03:14:44 UTC
List: ruby-dev #30678
Dear Masaki Suketa,
I use ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-mswin32]. By the second 
way I can do that.
Thanks for ur help.

Amin


Subject: [ruby-dev:30677] Re: excel is not closed in runtime using 
excel.Quit()

Masaki Suketa wrote:
> Could you show me the version of Ruby which you use?
> It seems to me that it is Win32OLE memory leak bug.
> And the bug is fixed in Ruby 1.8.6.
>
> If you use 1.8.6 or later, then try GC.start after excel.Quit()
>
>     excel.ActiveWorkbook.Close(0)    # close the workbook
>     excel.Quit()       #  close Excel file
>     excel = nil # <-- add
>     GC.start  # <-- add
>
> Or,  try the creation of Excel object out of while loop scope.
> You create Excel object only at once, and call excel.quit only
> at once.
>
>   excel = WIN32OLE::new('excel.Application')   # create excel only at once
>   while i<count
>     ...
>     workbook = excel.Workbooks.Open("#{path}") # Open the Excel file
>     ...
>     excel.ActiveWorkbook.Close(0)    # close the workbook
>   end
>   excel.Quit # excel quit only at once.
>
>  Regards,
>  Masaki Suketa


In This Thread

Prev Next