How to map Excel sheet data to my applicatioin in ruby.

Excel sheet having :
Firstname Lastname
venkat patchava

How to map Excel sheet data to my applicatioin in ruby.
Firstname : venkat
Lastname : patchava

Plaase help me in ASAP.

Hey there chowdary,

You can try the spreadsheet gem. I've used it myself in a couple
projects "back in the day" and it can read and write Excel
spreadsheets, and help you work with the data therein a bit more
easily.

http://rubygems.org/gems/spreadsheet

The basic guide should be enough to hopefully get you up and running:
http://spreadsheet.rubyforge.org/GUIDE_txt.html

Good luck!

Do you mean that you want Rails to read directly from the spreadsheet
(in which case Fallen Phoenix's suggestion of using the spreadsheet
gem may be the way to go) or are you just trying to seed the db from
the spreadsheet. If the latter then you could just export the data as
csv and import it into the database (by coding it in seed.rb and then
rake db:seed for example).

Colin