# Parseexcel retrieve strange chars

**URL:** <https://www.ruby-forum.com/t/parseexcel-retrieve-strange-chars/80481>\
**Category:** Ruby\
**Created:** [December 27, 2006, 3:50pm UTC](https://www.ruby-forum.com/t/parseexcel-retrieve-strange-chars/80481 "2006-12-27T15:50:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/f04885/32.png) [@Luiz](https://www.ruby-forum.com/u/Luiz)\
**Post date:** [December 27, 2006, 3:50pm UTC](https://www.ruby-forum.com/t/parseexcel-retrieve-strange-chars/80481/1 "2006-12-27T15:50:44Z")

</div>

Hi,

I am a Ruby newbie, and I am trying to use parseexcel library to  
retrieve some information from a spreadsheet, but when I try this, I  
receive the chars contained on the cell alternated square chars. Does  
anybody knows how to solve this?

Thanks,

Luiz

---

<div class="post-metadata">

**Author:** ![Luiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/f04885/32.png) [@Luiz](https://www.ruby-forum.com/u/Luiz)\
**Post date:** [December 27, 2006, 8:51pm UTC](https://www.ruby-forum.com/t/parseexcel-retrieve-strange-chars/80481/2 "2006-12-27T20:51:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Luiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/f04885/32.png) [@Luiz](https://www.ruby-forum.com/u/Luiz)\
**Post date:** [December 27, 2006, 9:05pm UTC](https://www.ruby-forum.com/t/parseexcel-retrieve-strange-chars/80481/3 "2006-12-27T21:05:36Z")

</div>

Luiz wrote:

> ```
> # 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 S.
