Raj Sahae
2/23/2007 11:21:00 AM
I don't know anything about the parseexcel library, but I can at least
explain the error.
The error you are getting simply says that the object"row", which is the
parameter you pass into your block from worksheet.each, is an instance
of Nil, and not an Array. So either the parse, workbook, or worksheet
is returning Nil somewhere.
>> require 'parseexcel'
>> workbook = Spreadsheet::ParseExcel.parse('2007-02-231028.xls')
>> worksheet = workbook.worksheet(0)
>> skip = 2
>> worksheet.each(skip) { |row|
>> # a row is actually just an Array of Cells..
>> first_cell = row.at(0)}
>>
>> Error is:undefined method `at' for nil:NilClass
>> I can not understand the error. please help me as i am a niwbie in ruby
>>