From: Masaki Suketa Date: 2006-03-25T22:20:34+09:00 Subject: WIN32OLE#[] and WIN32OLE#[]= method in Ruby 1.9 (or later) Hello, I have a question about Win32OLE. I think that I'll change the behavior of WIN32OLE#[] and WIN32OLE#[]= in Ruby 1.9 or later. I have not commited the change yet. Before commiting it, I want suggestions or opinions from Win32OLE users. For example, excel = WIN32OLE.excel("Excel.Application") excel["Visible"] = true is NG. Instead, You must write excel = WIN32OLE.excel("Excel.Application") excel.Visible = true For more, installer = WIN32OLE.new("WindowsInstaller.Installer") record = installer.CreateRecord(2) record ["StringData", 1] = 'dddd' is NG. Instead, installer = WIN32OLE.new("WindowsInstaller.Installer") record = installer.CreateRecord(2) record.setproperty("StringData", 1, 'dddd') By using new featuer, You can write worksheet.cells[1,2] = 10 in Excel. For more, you can write WIN32OLE.new("WScript.Shell") env = sh.Environment("User") p env["FOO"] env["FOO"] = "BARBAZ" For more, you can write ado = WIN32OLE.new("ADODB.Connection") ado.Open("...") rs = ado.Execute("SELECT * from TABLE01") while !rs.EOF puts rs.Fields.Item("id").value puts rs.Fields("id").value puts rs["id"].value # This is new feature! rs.MoveNext end and so on. Any comment, any question, welcome. Regards, Masaki Suketa