dwhite618
11/28/2006 8:54:00 PM
You might consider loading all the Excel constants, that way you can
reduce one layer of definition. See if this example helps:
require 'win32ole'
excel = WIN32OLE::new('excel.Application')
WIN32OLE.const_load(excel)
workbook = excel.Workbooks.Add
excel['Visible'] = true
sheet = workbook.worksheets(1)
sheet['Name'] = "One"
sheet.Range("a1:d1")['Value'] = [1,2,3,4]
sheet.Range("a1:d1").Borders['Weight'] = WIN32OLE::XlThick