Skip Menu |

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

Report information
The Basics
Id: 23556
Status: open
Priority: 0/
Queue: Spreadsheet-ParseExcel-Simple

People
Owner: Nobody in particular
Requestors: lprucha [...] sepaton.com
Cc:
AdminCc:

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



CC: "Prucha, Larry" <lprucha [...] sepaton.com>
Subject: Exception error
Date: Wed, 22 Nov 2006 14:08:53 -0500
To: <bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org>
From: "Prucha, Larry" <lprucha [...] sepaton.com>
Hi I gather that this only works on a windows box since I get an exception on "sheets" with this: "$sheet ($xls->sheets )" on a linux machine. Is there a work around? Larry Prucha
Subject: Re: [rt.cpan.org #23556] Exception error
Date: Wed, 22 Nov 2006 22:23:43 +0000
To: bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org
From: Tony Bowden <tony [...] tmtm.com>
Prucha, Larry via RT wrote: Show quoted text
> I gather that this only works on a windows box since I get an exception > on "sheets" with this: > "$sheet ($xls->sheets )" > on a linux machine. >
I've never tried using this on a Windows machine; it's developed and tested on Linux. Everything works fine for me, so I'll need a little more detail to know what's going wrong. Do the tests pass when installing (or are are they skipped)? What is the actual error you're getting, in what context? Do you have a simple reproducible test case? Tony
Subject: RE: [rt.cpan.org #23556] Exception error
Date: Mon, 27 Nov 2006 07:21:56 -0500
To: <bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org>
From: "Prucha, Larry" <lprucha [...] sepaton.com>
Hi Tony Here is the code: use strict; use Carp; use diagnostics "-verbose"; use warnings; use Spreadsheet::ParseExcel::Simple; my @data; my $ctr; my $PF; my $xls = Spreadsheet::ParseExcel::Simple->read('GUI_Status.xls'); my $sheet; foreach $sheet ($xls->sheets) { while ($sheet->has_data) { @data = $sheet->next_row; $ctr = 0; foreach (@data) { if ($ctr == 3) { $PF = $_; } # $ctr = 3 if ($_ =~ m/Bugs/) # $ctr = 4 { print "\n $PF $_"; #print "\n data = @data"; } $ctr++; } } } Here are the diagnostics: [qaweb@kibbutz tst_spreadsheet]$ perl noname_E.pl DESCRIPTION OF DIAGNOSTICS These messages are classified as follows (listed in increasing order of desperation): (W) A warning (optional). (D) A deprecation (optional). (S) A severe warning (default). (F) A fatal error (trappable). (P) An internal error you should never see (trappable). (X) A very fatal error (nontrappable). (A) An alien error message (not generated by Perl). The majority of messages from the first three classifications above (W, D & S) can be controlled using the warnings pragma. If a message can be controlled by the warnings pragma, its warning category is included with the classification letter in the description below. Default warnings are always enabled unless they are explicitly disabled with the warnings pragma or the -X switch. Trappable errors may be trapped using the eval operator. See perlfunc/eval. In almost all cases, warnings may be selectively disabled or promoted to fatal errors using the warnings pragma. See warnings. Can't call method "sheets" on an undefined value at noname_E.pl line 14 (#1) (F) You used the syntax of a method call, but the slot filled by the object reference or package name contains an undefined value. Something like this will reproduce the error: $BADREF = undef; process $BADREF 1,2,3; $BADREF->process(1,2,3); Uncaught exception from user code: Can't call method "sheets" on an undefined value at noname_E.pl line 14. BTW this works great on Windows! Thanks for responding! Larry Show quoted text
-----Original Message----- From: tony@tmtm.com via RT [mailto:bug-Spreadsheet-ParseExcel-Simple@rt.cpan.org] Sent: Wednesday, November 22, 2006 5:24 PM To: Prucha, Larry Subject: Re: [rt.cpan.org #23556] Exception error <URL: http://rt.cpan.org/Ticket/Display.html?id=23556 > Prucha, Larry via RT wrote:
> I gather that this only works on a windows box since I get an
exception
> on "sheets" with this: > "$sheet ($xls->sheets )" > on a linux machine. >
I've never tried using this on a Windows machine; it's developed and tested on Linux. Everything works fine for me, so I'll need a little more detail to know what's going wrong. Do the tests pass when installing (or are are they skipped)? What is the actual error you're getting, in what context? Do you have a simple reproducible test case? Tony
Subject: Re: [rt.cpan.org #23556] Exception error
Date: Mon, 27 Nov 2006 14:21:08 +0000
To: bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org
From: Tony Bowden <tony [...] tmtm.com>
Prucha, Larry via RT wrote: Show quoted text
> Here is the code: > use strict; > use Carp; > use diagnostics "-verbose"; >
As a general tip: please don't include diagnostics in test script reports, never mind verbose ones. They're useful for beginners when debugging, but they clutter up test reports. Show quoted text
> my $xls = Spreadsheet::ParseExcel::Simple->read('GUI_Status.xls'); > foreach $sheet ($xls->sheets) >
You should really check that you're getting something back from that read: my $xls = Spreadsheet::ParseExcel::Simple->read('GUI_Status.xls') or die "Can't open spreadsheet"; If your test runs under Windows, but not under Linux, then my guess would be that you're not actually able to open the file. If that's not the case, please send a self-contained test (i.e. with the problematic spreadsheet) Tony
Subject: RE: [rt.cpan.org #23556] Exception error
Date: Mon, 27 Nov 2006 09:31:17 -0500
To: <bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org>
From: "Prucha, Larry" <lprucha [...] sepaton.com>
Hi Tony Thanks for the tips. I thought the diagnostics might be helpful, will not include in the future. Well you are correct the program could not open the file, even after doing a chmod 777 on the file. Both files have the same owner. Any thoughts? Thanks Larry Show quoted text
-----Original Message----- From: tony@tmtm.com via RT [mailto:bug-Spreadsheet-ParseExcel-Simple@rt.cpan.org] Sent: Monday, November 27, 2006 9:21 AM To: Prucha, Larry Subject: Re: [rt.cpan.org #23556] Exception error <URL: http://rt.cpan.org/Ticket/Display.html?id=23556 > Prucha, Larry via RT wrote:
> Here is the code: > use strict; > use Carp; > use diagnostics "-verbose"; >
As a general tip: please don't include diagnostics in test script reports, never mind verbose ones. They're useful for beginners when debugging, but they clutter up test reports.
> my $xls = Spreadsheet::ParseExcel::Simple->read('GUI_Status.xls'); > foreach $sheet ($xls->sheets) >
You should really check that you're getting something back from that read: my $xls = Spreadsheet::ParseExcel::Simple->read('GUI_Status.xls') or die "Can't open spreadsheet"; If your test runs under Windows, but not under Linux, then my guess would be that you're not actually able to open the file. If that's not the case, please send a self-contained test (i.e. with the problematic spreadsheet) Tony
Subject: Re: [rt.cpan.org #23556] Exception error
Date: Mon, 27 Nov 2006 14:37:42 +0000
To: bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org
From: Tony Bowden <tony [...] tmtm.com>
Prucha, Larry via RT wrote: Show quoted text
> Well you are correct the program could not open the file, even after > doing a chmod 777 on the file. Both files have the same owner. Any > thoughts? > >
Could be all sorts of things. You could try throwing in an $! to see if it tells you anything useful: my $xls = Spreadsheet::ParseExcel::Simple->read('GUI_Status.xls') or die "Can't open file: $!\n"; Tony
Subject: RE: [rt.cpan.org #23556] Exception error
Date: Mon, 27 Nov 2006 09:47:16 -0500
To: <bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org>
From: "Prucha, Larry" <lprucha [...] sepaton.com>
Yup! Did that and the system claims it can't find the file! So I gave it the complete path and got the same result. So looks like I need to do something to get the perl program to "see" the file. Thanks for the help I think I can fix it now. Clearly this isn't a problem with "Spreadsheet::ParseExcel::Simple". Thanks Larry Show quoted text
-----Original Message----- From: tony@tmtm.com via RT [mailto:bug-Spreadsheet-ParseExcel-Simple@rt.cpan.org] Sent: Monday, November 27, 2006 9:38 AM To: Prucha, Larry Subject: Re: [rt.cpan.org #23556] Exception error <URL: http://rt.cpan.org/Ticket/Display.html?id=23556 > Prucha, Larry via RT wrote:
> Well you are correct the program could not open the file, even after > doing a chmod 777 on the file. Both files have the same owner. Any > thoughts? > >
Could be all sorts of things. You could try throwing in an $! to see if it tells you anything useful: my $xls = Spreadsheet::ParseExcel::Simple->read('GUI_Status.xls') or die "Can't open file: $!\n"; Tony