ghaydarov
2011-Sep-18 04:30 UTC
how to split, remove part of data in column with spreadsheet gem
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Reasonably Related Threads
- File created using Spreadsheet Excel can't read on linux
- WriteXLS - New Version 1.9.0
- WriteXLS - New Version 1.9.0
- Reading a SpreadsheetML / XMLNS into R xmlns="urn:schemas-microsoft-com:office:spreadsheet
- xls2csv.pl: Script to translate Excel files into CSV