# Escaped symbols when parsing XLS

**URL:** <https://www.ruby-forum.com/t/escaped-symbols-when-parsing-xls/150009>\
**Category:** Ruby\
**Created:** [October 2, 2008, 11:31am UTC](https://www.ruby-forum.com/t/escaped-symbols-when-parsing-xls/150009 "2008-10-02T11:31:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dive](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@dive](https://www.ruby-forum.com/u/dive)\
**Post date:** [October 2, 2008, 11:31am UTC](https://www.ruby-forum.com/t/escaped-symbols-when-parsing-xls/150009/1 "2008-10-02T11:31:37Z")

</div>

Hi all.

how can I escaped special characters when parsing XLS?

i try to parse by this line of code:

grid =  
Spreadsheet::ParseExcel.parse(“C:/Projects/Temp/arch/0043247/1.xls”).worksheet(0).map()  
{ |r| r }.compact.map() { |r| r.map() { |c| c.to\_s(‘cp1251’)}.compact  
rescue nil }

but if there are some special characters at rows, such as \ or ’ or `, i  
have nil at my array.

hot to escape special characters at this line { |c| c.to\_s(‘cp1251’)} ?

thanx for answers.
