From: Tim Pease Date: 2006-12-16T01:27:54+09:00 Subject: Re: ruby/ole excel delete row? On 12/14/06, Nathan Smith wrote: > You could use: > > excel.range('h2:h305').each do |cell| > cell.entireRow.delete if(cell.value == 'blah') > end > > There's not a whole lot of documentation on win32ole ruby out there, but the > Ruby Standard Library docs at http://ruby-doc.org are a good place to start, > and there's a little bit in the PickAxe. If you're working with MS Office, > I'd recommend going to Tools => Macro => Visual Basic Editor and looking > through the object browser. You can also record macros, look at the VB > source, and adapt that to Ruby. > I have found it helpful to browse the VBA help modules for the various MS Office applications. All the methods in those help modules are mapped to the win32ole ruby methods. You can find the help modules here C:\Program Files\Microsoft Office\Office10\1033 or C:\Program Files\Microsoft Office\OFFICE11\1033 Word => VBAWD10.CHM Excel => VBAXL10.CHM Access => VBAAC10.CHM Outlook => VBAOL11.CHM PowerPoint => VBAPP10.CHM Blessings, TwP