Thread

Posted on Mon Nov 14 18:57:04 2005 by sigkill9
Character in 'c' format wrapped in pack at c
I am getting this error when reading an XL file.

Character in 'c' format wrapped in pack at c:/Perl/site/lib/Spreadsheet/ParseExcel.pm line 1789.
Character in 'c' format wrapped in pack at c:/Perl/site/lib/Spreadsheet/ParseExcel.pm line 1790.

Here is a sample record.
There are more cells but for formatting reasons I removed them though the data is the same.

18 56.04 61.64 67.25 72.84 78.45 84.06 89.66 95.27 100.86

Thank you in advance.
Direct Responses: 2323 | 2324 | Write a response
Posted on Thu May 18 17:22:28 2006 by drone in response to 1312
Re: Character in 'c' format wrapped in pack at c
I get a very similar message at the same line with a different spreadsheet --

Character in "c" format wrapped at /usr/local/lib/perl5/site_perl/5.8.0/Spreadsheet/ParseExcel.pm line 1790. Character in "c" format wrapped at /usr/local/lib/perl5/site_perl/5.8.0/Spreadsheet/ParseExcel.pm line 1789.

I am using Spreadsheet-ParseExcel-0.2603 with Perl 5.8.0 on Solaris 5.8 Generic_117350-06.

Write a response
Posted on Thu May 18 22:02:06 2006 by drone in response to 1312
Re: Character in 'c' format wrapped in pack at c
This problem was solved for me by the solution posted in

http://idahospuds.blogspot.com/2006_03_01_idahospuds_archive.html

by changing --

substr($sWk, 3, 1) &= pack('c', unpack("c",substr($sWk, 3, 1)) & 0xFC);

substr($lWk, 0, 1) &= pack('c', unpack("c",substr($lWk, 0, 1)) & 0xFC);

to

substr($sWk, 3, 1) &= pack('C', unpack("C",substr($sWk, 3, 1)) & 0xFC);

substr($lWk, 0, 1) &= pack('C', unpack("C",substr($lWk, 0, 1)) & 0xFC);

In other words, change the quoted lower case "c" to uppercase on lines 1789 and 1790 in the ParseExcel.pm file in the Spreadsheet::ParseExcel version 0.2603 distribution.
Write a response