[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

escaped symbols when parsing XLS

Artyom Loenko

10/2/2008 9:30:00 AM

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.
--
Posted via http://www.ruby-....