> Hi,
>
>  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:
>
> require 'rubygems'
> require_gem 'parseexcel'
>
> 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'
>
>
> thanks,
> Abhishek Singhal
>

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to