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

People
Owner: jmcnamara [...] cpan.org
Requestors: jmcnamara [...] cpan.org
Cc:
AdminCc:

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

Attachments


Subject: CellHandler isn't localised to object
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 305
Download (untitled) / with headers
text/plain 305b
The CellHandler passed to new() is a class variable and isn't localised to the object. As such, it remains in force for all subsequent objects. See the following bug report and suggested workaround: http://groups.google.com/group/spreadsheet-parseexcel/browse_thread/thread/25abdb9e74a8d888 John. --
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-30017-1251069221-1154.43250-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 22
Fixed in version 0.52.
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-30017-1251069221-1154.43250-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: Web
References: <rt-3.6.HEAD-30017-1251069221-1154.43250-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1382478517-22751-2"
Message-ID: <rt-4.0.16-22751-1382478517-1950.43250-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 355
Download (untitled) / with headers
text/plain 355b
On Sun Aug 23 19:13:41 2009, JMCNAMARA wrote: Show quoted text
> Fixed in version 0.52.
CellHandler is still a package variable and not local to the object. So, e.g., you cannot begin to parse a file using CellHandler, and then parse another file, and continue parsing the first file. Attached is a patch that makes CellHandler,NotSetCell,and Object instance variables.
MIME-Version: 1.0
Subject: Spreadsheet-ParseExcel.diff
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Type: application/octet-stream; name="Spreadsheet-ParseExcel.diff"
Content-Disposition: inline; filename="Spreadsheet-ParseExcel.diff"
Content-Transfer-Encoding: base64
Content-Length: 2345
--- Spreadsheet-ParseExcel-0.59/lib/Spreadsheet/ParseExcel.pm Wed Apr 6 11:53:57 2011 +++ Spreadsheet-ParseExcel-0.59-fix/lib/Spreadsheet/ParseExcel.pm Tue Oct 22 14:34:51 2013 @@ -155,9 +155,6 @@ our $BIGENDIAN; our $PREFUNC; -our $_CellHandler; -our $_NotSetCell; -our $_Object; our $_use_perlio; #------------------------------------------------------------------------------ @@ -201,9 +198,9 @@ $self->SetEventHandler( $sKey, $hParam{AddHandlers}->{$sKey} ); } } - $_CellHandler = $hParam{CellHandler} if ( $hParam{CellHandler} ); - $_NotSetCell = $hParam{NotSetCell}; - $_Object = $hParam{Object}; + $self->{CellHandler} = $hParam{CellHandler}; + $self->{NotSetCell} = $hParam{NotSetCell}; + $self->{Object} = $hParam{Object}; if ( defined $hParam{Password} ) { @@ -516,6 +513,9 @@ my $workbook = Spreadsheet::ParseExcel::Workbook->new(); $workbook->{SheetCount} = 0; + $workbook->{CellHandler} = $self->{CellHandler}; + $workbook->{NotSetCell} = $self->{NotSetCell}; + $workbook->{Object} = $self->{Object}; my ( $biff_data, $data_length ) = $self->_get_content( $source, $workbook ); return undef if not $biff_data; @@ -2412,21 +2412,21 @@ $oCell->{Rich} = \@aRich; } - if ( defined $_CellHandler ) { - if ( defined $_Object ) { + if ( defined $oBook->{CellHandler} ) { + if ( defined $oBook->{Object} ) { no strict; - ref( $_CellHandler ) eq "CODE" - ? $_CellHandler->( + ref( $oBook->{CellHandler} ) eq "CODE" + ? $oBook->{CellHandler}->( $_Object, $oBook, $oBook->{_CurSheet}, $iR, $iC, $oCell ) - : $_CellHandler->callback( $_Object, $oBook, $oBook->{_CurSheet}, + : $oBook->{CellHandler}->callback( $_Object, $oBook, $oBook->{_CurSheet}, $iR, $iC, $oCell ); } else { - $_CellHandler->( $oBook, $oBook->{_CurSheet}, $iR, $iC, $oCell ); + $oBook->{CellHandler}->( $oBook, $oBook->{_CurSheet}, $iR, $iC, $oCell ); } } - unless ( $_NotSetCell ) { + unless ( $oBook->{NotSetCell} ) { $oBook->{Worksheet}[ $oBook->{_CurSheet} ]->{Cells}[$iR][$iC] = $oCell; } return $oCell;
MIME-Version: 1.0
In-Reply-To: <rt-4.0.16-22751-1382478517-1950.43250-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-3.6.HEAD-30017-1251069221-1154.43250-0-0 [...] rt.cpan.org> <rt-4.0.16-22751-1382478517-1950.43250-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.16-22768-1382478614-1089.43250-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 21
Trying to reopen...
MIME-Version: 1.0
In-Reply-To: <rt-4.0.16-22768-1382478614-1089.43250-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-3.6.HEAD-30017-1251069221-1154.43250-0-0 [...] rt.cpan.org> <rt-4.0.16-22751-1382478517-1950.43250-0-0 [...] rt.cpan.org> <rt-4.0.16-22768-1382478614-1089.43250-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.16-22766-1382480155-354.43250-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 319
Download (untitled) / with headers
text/plain 319b
On Tue Oct 22 17:50:14 2013, DOUGW wrote: Show quoted text
> Trying to reopen... >
Hi Douglas, I'm not really updating this module any more and have put it up for adoption. If you don't want the patch to be forgotten it is probably best to set up a Pull Request on GitHub: https://github.com/jmcnamara/spreadsheet-parseexcel John
MIME-Version: 1.0
In-Reply-To: <rt-4.0.16-22766-1382480155-354.43250-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-3.6.HEAD-30017-1251069221-1154.43250-0-0 [...] rt.cpan.org> <rt-4.0.16-22751-1382478517-1950.43250-0-0 [...] rt.cpan.org> <rt-4.0.16-22768-1382478614-1089.43250-0-0 [...] rt.cpan.org> <rt-4.0.16-22766-1382480155-354.43250-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-15545-1383245218-77.43250-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 406
Download (untitled) / with headers
text/plain 406b
On Tue Oct 22 18:15:55 2013, JMCNAMARA wrote: Show quoted text
> > I'm not really updating this module any more and have put it up for > adoption. > > If you don't want the patch to be forgotten it is probably best to set > up a Pull Request on GitHub:
I've forked and created a pull request. Although I don't entirely know what I'm doing on github, if you want to give me comaint status on this library, that'd be fine.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-15545-1383245218-77.43250-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-3.6.HEAD-30017-1251069221-1154.43250-0-0 [...] rt.cpan.org> <rt-4.0.16-22751-1382478517-1950.43250-0-0 [...] rt.cpan.org> <rt-4.0.16-22768-1382478614-1089.43250-0-0 [...] rt.cpan.org> <rt-4.0.16-22766-1382480155-354.43250-0-0 [...] rt.cpan.org> <rt-4.0.18-15545-1383245218-77.43250-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-5998-1383611080-570.43250-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 630
Download (untitled) / with headers
text/plain 630b
On Thu Oct 31 14:46:58 2013, DOUGW wrote: Show quoted text
> On Tue Oct 22 18:15:55 2013, JMCNAMARA wrote:
> > > > I'm not really updating this module any more and have put it up for > > adoption. > > > > If you don't want the patch to be forgotten it is probably best to > > set > > up a Pull Request on GitHub:
> > I've forked and created a pull request. Although I don't entirely know > what I'm doing on github, if you want to give me comaint status on > this library, that'd be fine.
Hi Doug, Thanks for that. Sorry, I've been backed up with work. I'll merge the PR and set you up with co-maintenance rights in the next few days. John
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-5998-1383611080-570.43250-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-3.6.HEAD-30017-1251069221-1154.43250-0-0 [...] rt.cpan.org> <rt-4.0.16-22751-1382478517-1950.43250-0-0 [...] rt.cpan.org> <rt-4.0.16-22768-1382478614-1089.43250-0-0 [...] rt.cpan.org> <rt-4.0.16-22766-1382480155-354.43250-0-0 [...] rt.cpan.org> <rt-4.0.18-15545-1383245218-77.43250-0-0 [...] rt.cpan.org> <rt-4.0.18-5998-1383611080-570.43250-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-28607-1388588081-806.43250-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 1387
Download (untitled) / with headers
text/plain 1.3k
On Mon Nov 04 19:24:40 2013, JMCNAMARA wrote: Show quoted text
> On Thu Oct 31 14:46:58 2013, DOUGW wrote:
> > I've forked and created a pull request.
Show quoted text
> Hi Doug, > > Thanks for that. > > Sorry, I've been backed up with work. I'll merge the PR and set you up > with co-maintenance rights in the next few days.
Hi Doug, It took a bit longer to get around to this than anticipated. Anyway a new year is a good time to start with something new. :-) I've given you co-maint rights on Pause and merged in any outstanding PRs on GitHub. If you like you can bring your fork up to date with mine and push a CPAN release from that. See below for my low-tech release procedure. John UPDATE CHANGELOG vi Changes CHANGE VERSIONS find lib -name *.pm|xargs perl -i -pe 's/(\$VERSION\s+= .)\d\.\d+/${1}0.59/' perl -i -pe 's/0\.58/0.59/' META.yml # Check dates changes git diff | egrep '^\+' | perl -pe 's{\+\+\+ b/}{\n}' Make TEST export RELEASE_TESTING=1 make test export RELEASE_TESTING=0 MAKE CHECKS git status make distcheck make dist cpants_lint.pl Spreadsheet-ParseExcel-0.59.tar.gz Release http://pause.perl.org/pause/query cpan-upload Spreadsheet-ParseExcel-0.59.tar.gz git status git add . git status git commit -m "Prep for release 0.59." git push origin master git tag CPAN_0.59 git push --tags
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-28607-1388588081-806.43250-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-3.6.HEAD-30017-1251069221-1154.43250-0-0 [...] rt.cpan.org> <rt-4.0.16-22751-1382478517-1950.43250-0-0 [...] rt.cpan.org> <rt-4.0.16-22768-1382478614-1089.43250-0-0 [...] rt.cpan.org> <rt-4.0.16-22766-1382480155-354.43250-0-0 [...] rt.cpan.org> <rt-4.0.18-15545-1383245218-77.43250-0-0 [...] rt.cpan.org> <rt-4.0.18-5998-1383611080-570.43250-0-0 [...] rt.cpan.org> <rt-4.0.18-28607-1388588081-806.43250-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-15251-1393456401-1870.43250-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 292
Download (untitled) / with headers
text/plain 292b
On Wed Jan 01 09:54:41 2014, JMCNAMARA wrote: Show quoted text
> On Mon Nov 04 19:24:40 2013, JMCNAMARA wrote: > > It took a bit longer to get around to this than anticipated.
It's taken me a while to get up to speed on github :-) Anyway, this one is fixed, and will hopefully close some more tickets soon.


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.