ruby on rails - Name Error in Excel Uninitalized Contant in 'roo' -


i trying read excel file in ruby on rails. have done coding reading cell content excel sheet.

def test  require 'rubygems'  require 'iconv'  require 'roo'   s = excel.new("c:/sites/hmmsapp/book1.xls")  s.default_sheet = s.sheets.first   1.upto(4) |line|    roll = s.cell(line,'a')    puts "#{roll} -------------"  end end 

but on running gives me error.

nameerror in hostelcontroller#test  uninitialized constant hostelcontroller::excel 

i have included iconv per suggestions problem. there no change in error. please give light removing error & read excel file properly.

try roo::excel.new

or roo::spreadsheet.new


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -