Error with book = Spreadsheet::Workbook.new

View: New views
3 Messages — Rating Filter:   Alert me  

Error with book = Spreadsheet::Workbook.new

by jorgegetafe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


This is my ruby code:




Code:
require 'rubygems'                                                          

require 'spreadsheet'                                                        

require 'yaml'



...

...



book = Spreadsheet::Worksbook.new        

$sheet = book.create_worksheet                                                

$sheet.name = 'Sheet1'



...

...





I always have an error on line: "book = Spreadsheet::Worksbook.new" saying: uninitialized constant Spreadsheet::Worksbook



I use 'spreadsheet' 0.64 versíon, how can i fixe it?



thanks






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Error with book = Spreadsheet::Workbook.new

by Erno Mononen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,


jorgegetafe wrote:

> This is my ruby code:
>
> Code:
> require 'rubygems'                                                          
>
> require 'spreadsheet'                                                        
>
> require 'yaml'
> ...
>
> ...
>
>
>
> book = Spreadsheet::Worksbook.new        
>  

Shouldn't that be

book = Spreadsheet::Workbook.new


instead (notice the missing 's' in Workbook).


Erno


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Error with book = Spreadsheet::Workbook.new

by jorgegetafe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


What a estupid error, thanks very much!!!!!






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...