Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatability issue? #3

Open
zdyu opened this issue May 11, 2011 · 2 comments
Open

Compatability issue? #3

zdyu opened this issue May 11, 2011 · 2 comments

Comments

@zdyu
Copy link

zdyu commented May 11, 2011

The following piece of code works well on the C Ruby + win32ole but failed on JRuby + jruby-win32ole.

require 'win32ole'

xl = WIN32OLE.new( "Excel.Application" )

if !defined? WIN32OLE::XlContinuous
   WIN32OLE.const_load( xl )
end

workbook = xl.workbooks.add
keys = workbook.Worksheets("Sheet1").Range( "A1" ).EntireRow
current = keys.Find( "abc",
                    nil,
                    WIN32OLE::XlValues,
                    WIN32OLE::XlPart,
                    WIN32OLE::XlByColumns,
                    WIN32OLE::XlNext,
                    false,
                    false,
                    false )

error message:

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 test.rb:12:in `__file__'
        from test.rb:-1:in `load'
        from Ruby.java:671:in `runScript'
        from Ruby.java:575:in `runNormally'
        from Ruby.java:424:in `runFromMain'
        from Main.java:278:in `doRunFromMain'
        from Main.java:198:in `internalRun'
        from Main.java:164:in `run'
        from Main.java:148:in `run'
        from Main.java:128:in `main'    
@enebo
Copy link
Owner

enebo commented May 11, 2011

This definitely looks like a bug. It also looks like one I wouldn't expect us to have. I don't have Excel but my next pass thru win32ole bugs I may ask you to run some scripts (or get a copy somewhere -- although I swear I have an older version somewhere).

@zdyu
Copy link
Author

zdyu commented Aug 10, 2011

Has this problem been fixed?

I just checked the JRuby1.6.3 + jruby-win32ole-0.8.4, and it seems the problem still exists...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants