RDE supports OLE automation.
Ruby, VB(A) and Perl, etc (that can be OLE automation clients) can control RDE.
You needs below setting befor using it.
Install
rde.exe /regserver
Uninstall
rde.exe /unregserver
Win32OLE is required. The arton's ActiveRuby destribution includes Win32OLE. The other destribution needs to install Win32OLE by yourself. http://www.ruby-lang.org/en/raa-list.rhtml?name=Win32OLE
All Methods is listed in RDE_TLB.txt.
require "win32ole" rde = WIN32OLE.new("RDE.Main") 5.times{|i| rde.Left = i * 15 sleep 0.5 } 5.times{|i| rde.Top = i * 15 sleep 0.5 }
This fixed strings is registerd by "rde".
' ' Excel VBA Sample ' List up caption and filename which RDE opens ' Sub test() Dim r As RDE.Main Set r = CreateObject("RDE.Main") For Each s In r.CodeWindows ActiveCell.Value = s.Caption ActiveCell.Offset(0, 1) = s.Filename ActiveCell.Offset(1).Select Next End Sub