Type:
Class
<code>WIN32OLE</code> objects represent OLE Automation object in Ruby.

By using WIN32OLE, you can access OLE server like VBScript.

Here is sample script.

  require 'win32ole'

  excel = WIN32OLE.new('Excel.Application')
  excel.visible = true
  workbook = excel.Workbooks.Add();
  worksheet = workbook.Worksheets(1);
  worksheet.Range("A1:D1").value = ["North","South","East","West"];
  worksheet.Range("A2:B2").value = [5.2, 10];
  worksheet.Range("C2").value = 8;
  worksheet.Range("D2").value = 20;

  range = worksheet.Range("A1:D2");
  range.select
  chart = workbook.Charts.Add;

  workbook.saved = true;

  excel.ActiveWorkbook.Close(0);
  excel.Quit();

Unfortunately, Win32OLE doesn't support the argument passed by reference directly. Instead, Win32OLE provides WIN32OLE::ARGV. If you want to get the result value of argument passed by reference, you can use WIN32OLE::ARGV.

oleobj.method(arg1, arg2, refargv3)
puts WIN32OLE::ARGV[2]   # the value of refargv3 after called oleobj.method
method_missing

WIN32OLE#method_missing(id [,arg1, arg2, ...]) Instance Public methods Calls

2015-06-12 21:00:55
ole_respond_to?

WIN32OLE#ole_respond_to?(method) â true or false Instance Public methods Returns

2015-06-12 21:48:36
create_guid

WIN32OLE.create_guid Class Public methods Creates GUID.

2015-06-12 19:59:27
ole_reference_count

WIN32OLE.ole_reference_count(aWIN32OLE) -â number Class Public methods Returns

2015-06-12 20:19:54
codepage=

WIN32OLE.codepage = CP Class Public methods Sets current codepage. The

2015-06-12 19:46:18
_getproperty

WIN32OLE#_getproperty(dispid, args, types) Instance Public methods Runs the

2015-06-12 20:42:42
_setproperty

WIN32OLE#_setproperty(dispid, args, types) Instance Public methods Runs the

2015-06-12 20:52:50
ole_initialize

ole_initialize() Class Public methods :nodoc

2015-06-12 20:16:31
connect

WIN32OLE.connect( ole ) -â aWIN32OLE Class Public methods Returns running OLE

2015-06-12 19:50:21
ole_method_help

ole_method_help(p1) Instance Public methods Alias for:

2015-06-12 21:33:02