From: Chris Shea Date: 2006-12-28T05:05:05+09:00 Subject: Re: Parseexcel retrieve strange chars Luiz wrote: > I print the square code char and it is zero (nil). Please, somebody > help me. > > workbook = Spreadsheet::ParseExcel.parse('myspreadsheet.xls') > > # usually, you want the first worksheet: > worksheet = workbook.worksheet(0) > > # now you can either iterate over all rows, skipping the first > number of > # rows (in case you know they just contain column headers) > myVal = worksheet.cell(0,4).value > puts myVal > If you're sure they're all null characters, you can always use gsub to get rid of them: myVal.gsub!(/\000/,'') Chris Shea