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: 70809
Status: resolved
Priority: 0/
Queue: Spreadsheet-ParseExcel

People
Owner: Nobody in particular
Requestors: peter.xt.tufvesson [...] stericsson.com
Cc:
AdminCc:

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



Subject: Issue: Democode mixes up sheets (Spreadsheet-ParseExcel-0.2602)
Date: Thu, 8 Sep 2011 16:00:06 +0200
To: "bug-Spreadsheet-ParseExcel [...] rt.cpan.org" <bug-Spreadsheet-ParseExcel [...] rt.cpan.org>
From: Peter TUFVESSON <peter.xt.tufvesson [...] stericsson.com>
Download (untitled) / with headers
text/plain 2.4k
Hello, First of all - thank you for a very nice contribution! However, I found one excel file which was not parsed properly by your democode. I have attached the excel file in question. Very simple. But I notice the file size is still quite big, so perhaps the file is corrupted in some way. It was created using Excel 2007 (12.0.6557.5000) SP2 MSO (12.0.6554.5001) Below is the code I run. It is an exact copy of the democode you provided. (Just changed the file name) ****** Code ************* use strict; use Spreadsheet::ParseExcel; my $oBook = Spreadsheet::ParseExcel::Workbook->Parse('test.xls'); my($iR, $iC, $oWkS, $oWkC); foreach my $oWkS (@{$oBook->{Worksheet}}) { print "--------- SHEET:", $oWkS->{Name}, "\n"; for(my $iR = $oWkS->{MinRow} ; defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ; $iR++) { for(my $iC = $oWkS->{MinCol} ; defined $oWkS->{MaxCol} && $iC <= $oWkS->{MaxCol} ; $iC++) { $oWkC = $oWkS->{Cells}[$iR][$iC]; print "( $iR , $iC ) =>", $oWkC->Value, "\n" if($oWkC); } } } And below is the result: ******* Result ************ C:\Doclists>test.pl --------- SHEET:A ( 0 , 0 ) =>a ( 0 , 1 ) =>b ( 0 , 2 ) =>c ( 0 , 3 ) =>d --------- SHEET:B C:\Doclists> According to ParseExcel, sheet A has the cells "a,b,c,d". But if you open the excel file, Sheet A does actually have cells "e,f,g,h". According to ParseExcel, sheet B has no cells. But if you open the excel file, Sheet A does actually have cells "a,b,c,d". Below you see I am using Windows XP. ******* Perl version ************ C:\Doclists>perl -v This is perl 5, version 12, subversion 3 (v5.12.3) built for MSWin32-x86-multi-t hread (with 9 registered patches, see perl -V for more detail) Copyright 1987-2010, Larry Wall Binary build 1204 [294330] provided by ActiveState http://www.ActiveState.com Built Feb 9 2011 14:38:22 Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. *********************** Please see what might have happened. Thanks again Peter
Download test.xls
application/vnd.ms-excel 91.5k

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 465b
HI, Version 0.2602 is very old and contains a look of bugs. Try the most recent version instead: http://search.cpan.org/~jmcnamara/Spreadsheet-ParseExcel- 0.59/lib/Spreadsheet/ParseExcel.pm The output from that version with you sample program produces the following output which is what you would expect: --------- SHEET:A ( 0 , 0 ) =>e ( 0 , 1 ) =>f ( 0 , 2 ) =>g ( 0 , 3 ) =>h --------- SHEET:B ( 0 , 0 ) =>a ( 0 , 1 ) =>b ( 0 , 2 ) =>c ( 0 , 3 ) =>d John
Download (untitled) / with headers
text/plain 293b
On Sat Sep 10 09:49:33 2011, JMCNAMARA wrote: Show quoted text
> > Version 0.2602 is very old and contains a look of bugs. Try the most > recent version instead: > > The output from that version with you sample program produces the > following output which > is what you would expect:
So, closing this then.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.