> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---