Christopher Dicely wrote in post #997903: > On Tue, May 10, 2011 at 9:43 PM, Zd Yu <zdyu2000 / gmail.com> wrote: >> Joel VanderWerf wrote in post #997899: >>> On 05/10/2011 08:38 PM, Zd Yu wrote: >>>> I want to achieve better performance through parallelism. The >>>> thread-level parallelism is not an option, because it is not *really* >>>> parallel. >>> >>> Is jruby acceptable? Jruby threads do make use of multiple processors. >> >> I need to use win32ole. I am afraid JRuby cannot do this. > > There is a jruby-win32ole gem -- I haven't used it, but it sounds like > it may do what you want. I just tried it. It seems there are some compatible problems. My code does not work with JRuby + jruby-win32ole, although it works well with ruby + win32ole. The error looks like: ===================== Dispatch.java:-2:in `invokev': org.racob.com.ComFailException: Invoke of: Find Source: Description: from Dispatch.java:243:in `invokev' from Dispatch.java:187:in `callN' from RubyWIN32OLE.java:203:in `invokeMethodOrGet' from RubyWIN32OLE.java:112:in `method_missing' from RubyWIN32OLE$i$0$0$method_missing.gen:65535:in `call' from JavaMethod.java:642:in `call' from RuntimeHelpers.java:497:in `call' from CachingCallSite.java:345:in `callMethodMissing' from CachingCallSite.java:249:in `cacheAndCall' from CachingCallSite.java:71:in `call' from C:\my_tool.rb:1362:in `method__98$RUBY$find' my code: (Excel manipulation) ========== keys = @workbook.Worksheets("sheet name").Range( "A1" ).EntireRow current = keys.Find( value, nil, WIN32OLE::XlValues, WIN32OLE::XlPart, WIN32OLE::XlByColumns, WIN32OLE::XlNext, false, false, false ) ================== it seems the 'Find' method cannot be invoked. -- Posted via http://www.ruby-forum.com/.