From: bbiker Date: 2007-02-24T06:45:08+09:00 Subject: Re: undefined method `at' for nil:NilClass in parseexcel.help pl On Feb 23, 3:41 am, Ruhul Amin wrote: > use this code to open my '2007-02-231028.xls' file. the file is in the > same directory of the program. > my code: > > 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 > > -- > Posted viahttp://www.ruby-forum.com/. Are you sure the syntax is correct ... 1. never seen code where each takes parameter 2. worksheet is a single object .. not an array of worksheets 3. Perhaps it should be worksheet.Rows.each { |row| do whatever including skipping }