I am new to ruby on rails.I am having problem reading excel files. I
tried using gem 'parseexcel' but still the error is coming.
Could you please help me with the code and how to use this gem? Is
there any better way to read excel sheets.
Snippet of Code:
class Exams < ActiveRecord::Base
path_to_file = 'C:\canvass\app\view\main\test.xls'
workbook = Spreadsheet::ParseExcel.parse(path_to_file)
# usually, you want the first worksheet:
worksheet = workbook.worksheet(0)
Also I am facing the error - ' uninitialized constant Spreadsheet'