From: ChrisH Date: 2006-12-06T05:30:08+09:00 Subject: Re: Can't sort array Bernard Kenik wrote: > Hi all, > > I want to print all the methods in excel OLE object > in alphabetic order but the sort method is > unavailable. Can anyone explain it and help me fix it? > > Thank you, > > Li > ## > require 'win32ole' > excel = WIN32OLE.new('Excel.Application') > m = excel.ole_methods > p m.class > p m.sort ... Since you want to sort by method name, give a block to sort, i.e.: p m.sort{|a| a.name <=> b.name} Cheers Chris