Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Spreadsheet-ParseExcel CPAN distribution.

Maintainer(s)' notes

If you are reporting a bug in Spreadsheet::ParseExcel here are some pointers

1) State the issues as clearly and as concisely as possible. A simple program or Excel test file (see below) will often explain the issue better than a lot of text.

2) Provide information on your system, version of perl and module versions. The following program will generate everything that is required. Put this information in your bug report.

    #!/usr/bin/perl -w

    print "\n    Perl version   : $]";
    print "\n    OS name        : $^O";
    print "\n    Module versions: (not all are required)\n";

    my @modules = qw(
                      Spreadsheet::ParseExcel
                      Scalar::Util
                      Unicode::Map
                      Spreadsheet::WriteExcel
                      Parse::RecDescent
                      File::Temp
                      OLE::Storage_Lite
                      IO::Stringy
                    );

    for my $module (@modules) {
        my $version;
        eval "require $module";

        if (not $@) {
            $version = $module->VERSION;
            $version = '(unknown)' if not defined $version;
        }
        else {
            $version = '(not installed)';
        }

        printf "%21s%-24s\t%s\n", "", $module, $version;
    }

    __END__

3) Upgrade to the latest version of Spreadsheet::ParseExcel (or at least test on a system with an upgraded version). The issue you are reporting may already have been fixed.

4) Create a small example program that demonstrates your problem. The program should be as small as possible. A few lines of codes are worth tens of lines of text when trying to describe a bug.

5) Supply an Excel file that demonstrates the problem. This is very important. If the file is big, or contains confidential information, try to reduce it down to the smallest Excel file that represents the issue. If you don't wish to post a file here then send it to me directly: jmcnamara@cpan.org

6) Say if the test file was created by Excel, OpenOffice, Gnumeric or something else. Say which version of that application you used.

7) If you are submitting a patch you should check with the maintainer whether the issue has already been patched or if a fix is in the works. Patches should be accompanied by test cases.

Asking a question

If you would like to ask a more general question there is the Spreadsheet::ParseExcel Google Group.

Report information
The Basics
Id: 59204
Status: resolved
Priority: 0/
Queue: Spreadsheet-ParseExcel

People
Owner: Nobody in particular
Requestors: dorian [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Parse fails on older (v5?) files
I have what purports to be an Excel file from 1994 that fails to parse with the following error: substr outside of string at /usr/local/share/perl/5.10.0/Spreadsheet/ParseExcel.pm line 1633. A quick look at the module yields the following: $oWkS->{HeaderMargin} = _convDval( substr( $sWk, 16, 8 ) ); $oWkS->{FooterMargin} = _convDval( substr( $sWk, 24, 8 ) ); ...presumably the format has changed since the mid-90s? ;) Unfortunately I can't release the offending file, since it contains sensitive information. If you have any insight into where that method fits into the format spec, however, I'm content to submit a patch. Thanks! As requested: Perl version : 5.010000 OS name : linux Module versions: (not all are required) Spreadsheet::ParseExcel 0.57 Scalar::Util 1.21 Unicode::Map 0.112 Spreadsheet::WriteExcel 2.25 Parse::RecDescent 1.962.2 File::Temp 0.22 OLE::Storage_Lite 0.19 IO::Stringy 2.110
Hi, If the file contains sensitive information delete it out. In fact you can probably delete all the worksheets and data apart from the error throwing header and footer. It is almost impossible to debug these issues without a sample Excel file. John. --
Subject: Re: [rt.cpan.org #59204] Parse fails on older (v5?) files
Date: Tue, 13 Jul 2010 13:17:32 -0700
To: bug-Spreadsheet-ParseExcel [...] rt.cpan.org
From: Dorian Taylor <dorian.taylor [...] gmail.com>
On 13-Jul-10, at 1:39 AM, John McNamara via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=59204 > > > Hi, > > If the file contains sensitive information delete it out. In fact you > can probably delete all the worksheets and data apart from the error > throwing header and footer. > > It is almost impossible to debug these issues without a sample Excel > file. > > John.
Fair enough; my concern with modifying the file was that it would stop doing whatever it was doing to cause the parser to break. I found a copy of Excel 4.0 on an abandonware site; I'll see if I can get it to work in Wine and get back to you. -- Dorian Taylor http://doriantaylor.com/
On Tue Jul 13 04:39:53 2010, JMCNAMARA wrote: Show quoted text
> Hi, > > If the file contains sensitive information delete it out. In fact you > can probably delete all the worksheets and data apart from the error > throwing header and footer. > > It is almost impossible to debug these issues without a sample Excel file. > > John.
Okay. It's Excel 4, not 5, I was mistaken. I found it on an abandonware site and luckily it contained a bunch of samples, so I attached them. If you run over the samples with the following oneliner you can see the errors for yourself: find excel4-samples/ -name \*.XLS -exec perl -MSpreadsheet::ParseExcel -wle 'warn $ARGV[0]; warn Spreadsheet::ParseExcel->new->parse($ARGV[0])' {} \; 2>errors Most of the files generate errors which are consistent with the one I experienced originally. One parses successfully, QE/EMP.XLS, however it's worth noting that it spews out a bunch of uninitialized value warnings, which you can see in the errors file. Regards, Dorian
Subject: errors
Download errors
application/octet-stream 45k

Message body not shown because it is not plain text.

Subject: excel4-samples.tar.gz
Download excel4-samples.tar.gz
application/x-tar 964.7k

Message body not shown because it is not plain text.

On Tue Jul 13 18:38:10 2010, DORIAN wrote: Show quoted text
> On Tue Jul 13 04:39:53 2010, JMCNAMARA wrote:
> > Hi, > > > > If the file contains sensitive information delete it out. In fact you > > can probably delete all the worksheets and data apart from the error > > throwing header and footer. > > > > It is almost impossible to debug these issues without a sample Excel file. > > > > John.
> > Okay. It's Excel 4, not 5, I was mistaken. I found it on an abandonware > site and luckily it contained a bunch of samples, so I attached them.
Hi Dorian, Sorry for taking so long on this. I've put a workaround in ParseExcel to ignore the Excel 4 record that is causing the problem. The changes are in the ParseExcel repo on GitHub: http://github.com/jmcnamara/spreadsheet-parseexcel You can download the updated version and test it from there. Use the "Download source" button. John. --
Fixed in Spreadsheet::ParseExcel version 0.58. Thanks, John. --