each

WIN32OLE#each {|i|...} Instance Public methods Iterates over each item of OLE collection which has IEnumVARIANT interface. excel = WIN32OLE.new('Excel.Application') book = excel.workbooks.add sheets = book.worksheets(1) cells = sheets.cells("A1:A5") cells.each do |cell| cell.value = 10 end

invoke

WIN32OLE#invoke(method, [arg1,...]) => return value of method. Instance Public methods Runs OLE method. The first argument specifies the method name of OLE Automation object. The others specify argument of the method. If you can not execute method directly, then use this method instead. excel = WIN32OLE.new('Excel.Application') excel.invoke('Quit') # => same as excel.Quit

method_missing

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

ole_activex_initialize

WIN32OLE#ole_activex_initialize() â Qnil Instance Public methods Initialize WIN32OLE object(ActiveX Control) by calling IPersistMemory::InitNew. Before calling OLE method, some kind of the ActiveX controls created with MFC should be initialized by calling IPersistXXX::InitNew. If and only if you received the exception âHRESULT error code: 0x8000ffff catastrophic failureâ, try this method before invoking any ole_method. obj = WIN32OLE.new("ProgID_or_GUID_of_ActiveX_Control") obj.ol

ole_free 2

WIN32OLE#ole_free Instance Public methods invokes Release method of Dispatch interface of WIN32OLE object. Usually, you do not need to call this method because Release method called automatically when WIN32OLE object garbaged.

ole_func_methods

WIN32OLE#ole_func_methods Instance Public methods Returns the array of WIN32OLE_METHOD object . The element of the array is property (settable) of WIN32OLE object. excel = WIN32OLE.new('Excel.Application') properties = excel.ole_func_methods

ole_get_methods

WIN32OLE#ole_get_methods Instance Public methods Returns the array of WIN32OLE_METHOD object . The element of the array is property (gettable) of WIN32OLE object. excel = WIN32OLE.new('Excel.Application') properties = excel.ole_get_methods

ole_method

WIN32OLE#ole_method_help(method) Instance Public methods Returns WIN32OLE_METHOD object corresponding with method specified by 1st argument. excel = WIN32OLE.new('Excel.Application') method = excel.ole_method_help('Quit') ole_method_help

ole_method_help

ole_method_help(p1) Instance Public methods Alias for: ole_method

ole_methods

WIN32OLE#ole_methods Instance Public methods Returns the array of WIN32OLE_METHOD object. The element is OLE method of WIN32OLE object. excel = WIN32OLE.new('Excel.Application') methods = excel.ole_methods