Maybe a little out of scope for this group but I am trying to write and
retrieve cell data from Excel iteratively with ruby using the activecell
property. Only problem is it does not seem to work.

My script is basically

require 'win32ole'
application = WIN32OLE.new('Excel.Application')

application.visible = TRUE
workbook = application.Workbooks.Add();
worksheet = workbook.Worksheets(1);
(1..4).each do |x|
dirArray = ['North','South','East','West']
worksheet.Range('A' + (x.to_s)).value = dirArray[(x-1)]
end

sheet = application.activesheet
sheet.activecell.offset(1,0).activate

and I always get the error 
excell.rb:47:in `method_missing': Unknown property or method
`activecell' (WIN32OLERuntimeError)

Am I missing a lib or something? I can find no reference to other people
having this issue

Any help would be appreciated

Malcolm Beaton

_____________________________________________________________________
This e-mail has been scanned for viruses by MessageLabs. The information 
contained in this message is confidential and is intended for the addressee 
only. If you have received this message in error, please notify Conchango plc 
as soon as possible. The unauthorised use, disclosure, copying or alteration of 
this message is prohibited and may be unlawful. The internet cannot guarantee 
the integrity of this message and therefore Conchango plc will not be liable 
for the message if modified.  

Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 222 222 
F 44 (0) 1784 222 200 E [EMAIL PROTECTED]  No. 2598884

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to