Forum: Ruby Delete Enitre column in excel using ruby code

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
ruby l. (Guest)
on 2009-04-19 17:30
Hi All,
         I need to delete entire column(GB) in excel using ruby code.
let me whether i should write some code or is there a way to call an
macro in excel.
whichever is simpler or easy way to maintain.
David M. (Guest)
on 2009-04-19 19:46
Idealone I. wrote:
> Hi All,
>          I need to delete entire column(GB) in excel using ruby code.
> let me whether i should write some code or is there a way to call an
> macro in excel.
> whichever is simpler or easy way to maintain.

Where ws is your Worksheet object:

  ws.Columns('GB').Delete

More info on automating Excel with Ruby can be found here:

  http://rubyonwindows.blogspot.com/search/label/excel

David

http://rubyonwindows.blogspot.com
This topic is locked and can not be replied to.