From: "lrlebron@..." Date: 2008-07-08T11:01:30+09:00 Subject: Re: How to point to proper worksheet in excel On Jul 7, 2:44 am, Marcin Tyman wrote: > I have following code: > > @xl = WIN32OLE.new('Excel.Application') > @xl['Visible'] = TRUE > @wb = @xl.Workbooks.Add > @ws = @xb.Worksheets("XXXXX") > > The problem is that last line throws exception: moethod_missing: > Worksheets > > Why? I had read examples from net and did everything according to them. > > Another question is how to create a chart in excel and: > add several series to it > named it > assign names to axis > assign names to the series > set chart type. > -- > Posted viahttp://www.ruby-forum.com/. Here's an exzmple that may help require 'win32ole' excel = WIN32OLE::new('excel.Application') excel['Visible'] = true workbook = excel.Workbooks.Open(filename) worksheet = workbook.Worksheets(1) #get hold of the first worksheet You can also find a lot of information on using Ruby with Excel here http://rubyonwindows.blogspot.com/ Hope this helps. Luis