Using spreadsheet gem and rails

MY CODE GOES BELOW:

book = Spreadsheet.open 'excel-file.xls'
sheet = book.worksheet 0
book.write 'output-file.xls'



and here goes the first problem:
I want to remove data that comes after ";" (semicolon) in a column.
Example below.

FULTON BANK NA;FULTON BANK

I just want it to be FULTON BANK NA for example.
-------------------------------------------------------------------------------------
the second problem:
I want only leave price data like this: $78,000.00 and want to strip
all other data from specific column.

Example below.

MORTGAGE - CORPORATE;($78,000.00)

I just want it to be $78,000.00 for example.




Your help is appreciated,
thanks

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedSep 18, '11 at 6:05a
activeSep 18, '11 at 6:05a
posts1
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Ghaydarov: 1 post

People

Translate

site design / logo © 2021 Grokbase