# Problem in reading the columns from an xls file

**URL:** <https://www.ruby-forum.com/t/problem-in-reading-the-columns-from-an-xls-file/196793>\
**Category:** Rails\
**Created:** [August 26, 2008, 9:11am UTC](https://www.ruby-forum.com/t/problem-in-reading-the-columns-from-an-xls-file/196793 "2008-08-26T09:11:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vidya1111](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b3f665/32.png) [@vidya1111](https://www.ruby-forum.com/u/vidya1111)\
**Post date:** [August 26, 2008, 9:11am UTC](https://www.ruby-forum.com/t/problem-in-reading-the-columns-from-an-xls-file/196793/1 "2008-08-26T09:11:53Z")

</div>

I am having a problem in reading the columns from an xls file.

Following is the code:  
workbook = Spreadsheet::ParseExcel.parse(params[:dump][:file])  
worksheet = workbook.worksheet(0)

```
    skip=0
    worksheet.each(skip) { |row|

    puts row.at(0)

    }

```

I am storing “Customer” in the first row first column. When I print, it  
is received as C[]u[]s[]t[]o[]m[]e[]r[] (I mean a box in between each  
letter).  
Am i missing out anything in the code?

Please help.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![vidya1111](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b3f665/32.png) [@vidya1111](https://www.ruby-forum.com/u/vidya1111)\
**Post date:** [August 26, 2008, 12:47pm UTC](https://www.ruby-forum.com/t/problem-in-reading-the-columns-from-an-xls-file/196793/2 "2008-08-26T12:47:25Z")

</div>

row.at(0).to\_s(‘latin1’) has fixed the issue.
