L
Li Chen
Hi all,
I need to use WIN32OLE to do some Excel automation. I read some
documents and search google.The examples of how to use WIN32OLE are
almost the same. But none of them show how to translate a VBA code into
Ruby. Here are the VBA codes:
Sub AddNew()
Set NewBook = Workbooks.Add
With NewBook
.Title = "All Sales"
.Subject = "Sales"
.SaveAs Filename:="Allsales.xls"
End With
End Sub
And here are some Ruby codes:
require 'win32ole'
excel=WIN32OLE.new('Excel.Application')
workbook=excel.Workbooks.Add
worksheet=workbook.Worksheets.Add
I wonder if any expert out there could give me an example on how to
translate Title, Subject, and SaveAs Filename into to Ruby codes.
Thanks,
Li
I need to use WIN32OLE to do some Excel automation. I read some
documents and search google.The examples of how to use WIN32OLE are
almost the same. But none of them show how to translate a VBA code into
Ruby. Here are the VBA codes:
Sub AddNew()
Set NewBook = Workbooks.Add
With NewBook
.Title = "All Sales"
.Subject = "Sales"
.SaveAs Filename:="Allsales.xls"
End With
End Sub
And here are some Ruby codes:
require 'win32ole'
excel=WIN32OLE.new('Excel.Application')
workbook=excel.Workbooks.Add
worksheet=workbook.Worksheets.Add
I wonder if any expert out there could give me an example on how to
translate Title, Subject, and SaveAs Filename into to Ruby codes.
Thanks,
Li