[Ironruby-core] Interop with Excel

Jeff Siebold lists at ruby-forum.com
Wed Apr 8 12:07:59 EDT 2009

I'm replying to my own post because it looks like I found part of my 
problem. I changed the code to:

require 'Microsoft.Office.Interop.Excel, Version=, 
Culture=neutral, PublicKeyToken=71e9bce111e9429c'
include Microsoft::Office::Interop::Excel
excel = ApplicationClass.new
excel.Visible = true

and that works. But I'm still having trouble getting access a Workbook:

p excel.ActiveWorkbook
workbooks = excel.Workbooks
p workbooks.respond_to?('Open')


I would be grateful for any help. Thanks, Jeff

Jeff Siebold wrote:
> The following code runs fine:
>   require 'Microsoft.Office.Interop.Excel, Version=,
> Culture=neutral, PublicKeyToken=71e9bce111e9429c'
>   Excel = Microsoft::Office::Interop::Excel
> but when I try to get the Application object as follows:
>   app = Excel.Application.new
> I get the following error:
> excel.rb:0: undefined method `Application' for
> Microsoft::Office::Interop::Excel:Module (NoMethodError)
> am I not understanding how this works or is this just not working yet?

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

More information about the Ironruby-core mailing list