in reply to Re: Error reading Excel Cell Value
in thread Error reading Excel Cell Value

Hi, Please see the debug report below.
DB<1> x $cell 0 Spreadsheet::ParseExcel::Cell=HASH(0x8f6430c) 'Code' => undef 'Format' => Spreadsheet::ParseExcel::Format=HASH(0x8f0eb44) 'AlignH' => 0 'AlignV' => 2 'BdrColor' => ARRAY(0x8f0eb5c) 0 0 1 0 2 0 3 0 'BdrDiag' => ARRAY(0x8f0eb8c) 0 0 1 0 2 0 'BdrStyle' => ARRAY(0x8f0e268) 0 0 1 0 2 0 3 0 'Fill' => ARRAY(0x8f0ebc8) 0 1 1 42 2 64 'FmtIdx' => 43 'Font' => Spreadsheet::ParseExcel::Font=HASH(0x8c4e080) 'Attr' => 0 'Bold' => 0 'Color' => 32767 'Height' => 10 'Italic' => 0 'Name' => 'Arial' 'Strikeout' => 0 'Super' => 0 'Underline' => 0 'UnderlineStyle' => 0 'FontNo' => 0 'Hidden' => 0 'Indent' => 0 'JustLast' => 0 'Key123' => 0 'Lock' => 1 'Merge' => 0 'ReadDir' => 0 'Rotate' => 0 'Shrink' => 0 'Style' => 0 'Wrap' => 0 'FormatNo' => 29 'Type' => 'Numeric' 'Val' => '7.42648557919274e+275' '_Kind' => 'RK' '_Value' => ' 742,648,557,919,274,215,596,480,721,467,753,739,797, +881,839,158,032,045,444,744,972,281,248,374,846,048,088,725,564,424,7 +05,059,145,840,738,686,965,435,358,755,836,749,146,754,873,675,932,60 +0,092,125,946,893,868,194,138,671,244,971,437,781,478,579,517,410,099 +,590,090,026,114,048,017,693,855,644,672,962,827,489,552,711,307,891, +602,716,747,903,682,255,045,301,108,736.00 '
Thanks

Replies are listed 'Best First'.
Re^3: Error reading Excel Cell Value
by no21 (Sexton) on Oct 06, 2008 at 22:53 UTC

    Wow, that's a big number.

    I work with this module on a daily basis, and when I see weird behavior like this, it is usually due to things like hidden worksheets in the Excel workbook, or the Excel workbook was generated by some other software package.

    I don't even know if this is possible via perlmonks.org, but if you're comfortable with posting/attaching the exact Excel file that is giving you this problem, I wouldn't mind taking a look at it myself.

    If there's no way to post a file here, I could possibly give you an email address to send the file to.

      Hi,
      I would be happy to send you the spread sheet. Can you please send me your email address.
      Thank you!
        I ran the following code on your file:
        #!/usr/bin/perl use strict; use warnings; use Data::Dumper::Simple; use Spreadsheet::ParseExcel; my $workbook = 'test.xls'; my $worksheet_name = 'Sheet1'; my $wb = Spreadsheet::ParseExcel::Workbook -> Parse ( $workbook ) or warn ( "Problem opening $workbook!\n") ; my $ws = $wb -> Worksheet( $worksheet_name ); foreach my $row ( $ws -> { MinRow } .. $ws -> { MaxRow } ) { foreach my $col ( $ws -> { MinCol } .. $ws -> { MaxCol } ) { my $cell = $ws -> { Cells }[ $row ][ $col ]; if ( $cell ) { my $val = $cell -> { Val }; my $value = $cell -> Value; if ( $row == 33 && $col == 13 ) { print "[$row:$col] = $val\n"; print "[$row:$col] = $value\n"; } } } }

        This was the output:
        [33:13] = -4.1 [33:13] = (-4.10)
        As you can see, I was unable to reproduce the problem you are having. Are you using the latest version of Spreadsheet::ParseExcel?