Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

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

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

People
Owner: Nobody in particular
Requestors: schmidl [...] webdynamite.com
Cc:
AdminCc:

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



Subject: Spreadsheet::ParseExcel::Simple and Unicode
Date: Wed, 1 Mar 2006 13:49:17 +0100
To: <bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org>
From: "DI Gunther Schmidl" <schmidl [...] webdynamite.com>
Download (untitled) / with headers
text/plain 591b
Hi, I've extended Spreadsheet::ParseExcel::Simple to allow using Spreadsheet::ParseExcel's Unicode formatter by simply adding a parameter like this: my $xls = Spreadsheet::ParseExcel::Simple->read('file.xls', 1); If you're interested in adding this to the CPAN distribution, I can send you the source code or a diff. Regards, -- Gunther Show quoted text
_________________________________________ DI Gunther Schmidl (Consultant) WebDynamite IT Solutions GmbH Landstraße 49, A-4020 Linz, Austria http://www.webdynamite.com +43 / 732 / 777 810 - 16 (fixed) +43 / 732 / 777 810 - 50 (fax)
Subject: Re: [rt.cpan.org #17914] Spreadsheet::ParseExcel::Simple and Unicode
Date: Wed, 1 Mar 2006 16:30:38 +0000
To: DI Gunther Schmidl via RT <bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org>
From: Tony Bowden <tony [...] kasei.com>
Download (untitled) / with headers
text/plain 655b
On Wed, Mar 01, 2006 at 07:49:46AM -0500, DI Gunther Schmidl via RT wrote: Show quoted text
> I've extended Spreadsheet::ParseExcel::Simple to allow using > Spreadsheet::ParseExcel's Unicode formatter by simply adding a parameter > like this: > my $xls = Spreadsheet::ParseExcel::Simple->read('file.xls', 1);
I don't really like "magic number" parameters. If this could be modified to be a hashref of options: e.g. my $xls = Spreadsheet::ParseExcel::Simple->read('file.xls', { unicode_formatter => 1, }); then I'd be more inclined to include it. (Feel free to suggest a better name for the option too) Do you also have a test case for this? Thanks, Tony
Subject: AW: [rt.cpan.org #17914] Spreadsheet::ParseExcel::Simple and Unicode
Date: Wed, 22 Mar 2006 15:22:34 +0100
To: <bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org>
From: "DI Gunther Schmidl" <schmidl [...] webdynamite.com>
Download (untitled) / with headers
text/plain 1.5k
Tony, it's been a while since your reply and I've only now had time to do this, but: Tony Bowden via RT wrote: Show quoted text
> On Wed, Mar 01, 2006 at 07:49:46AM -0500, DI Gunther Schmidl via RT > wrote:
>> I've extended Spreadsheet::ParseExcel::Simple to allow using >> Spreadsheet::ParseExcel's Unicode formatter by simply adding a >> parameter like this: my $xls = >> Spreadsheet::ParseExcel::Simple->read('file.xls', 1);
> > I don't really like "magic number" parameters. > > If this could be modified to be a hashref of options: > > e.g. > > my $xls = Spreadsheet::ParseExcel::Simple->read('file.xls', { > unicode_formatter => 1, > }); > > > then I'd be more inclined to include it.
I've changed the parameter. This reads a file as Unicode: my $xls = Spreadsheet::ParseExcel::Simple->read("test.xls", {as_unicode => 1}); These work as previously: my $xls = Spreadsheet::ParseExcel::Simple->read("test.xls"); my $xls = Spreadsheet::ParseExcel::Simple->read("test.xls", {as_unicode => 0}); Show quoted text
> > Do you also have a test case for this? >
I'm afraid I don't -- the Unicode-related errors come directly from Spreadsheet::ParseExcel, so there's really no way of testing this other than looking at the console output and not seeing the gigantic bunch of warnings one usually gets. Let me know if you're still interested. Thanks, -- Gunther Show quoted text
_________________________________________ DI Gunther Schmidl (Consultant) WebDynamite IT Solutions GmbH Landstraße 49, A-4020 Linz, Austria http://www.webdynamite.com +43 / 732 / 777 810 - 16 (fixed) +43 / 732 / 777 810 - 50 (fax)
Subject: Re: [rt.cpan.org #17914] Spreadsheet::ParseExcel::Simple and Unicode
Date: Wed, 22 Mar 2006 14:33:28 +0000
To: DI Gunther Schmidl via RT <bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org>
From: Tony Bowden <tony [...] kasei.com>
Download (untitled) / with headers
text/plain 505b
On Wed, Mar 22, 2006 at 09:23:02AM -0500, DI Gunther Schmidl via RT wrote: Show quoted text
> it's been a while since your reply and I've only now had time to do this,
No worries. Show quoted text
> I'm afraid I don't -- the Unicode-related errors come directly from > Spreadsheet::ParseExcel, so there's really no way of testing this other than > looking at the console output and not seeing the gigantic bunch of warnings > one usually gets.
There must be some way of testing it - what sorts of problems does it cause? Thanks, Tony
Subject: AW: [rt.cpan.org #17914] Spreadsheet::ParseExcel::Simple and Unicode
Date: Wed, 22 Mar 2006 15:56:35 +0100
To: <bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org>
From: "DI Gunther Schmidl" <schmidl [...] webdynamite.com>
Download (untitled) / with headers
text/plain 542b
Tony Bowden via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=17914 > > > There must be some way of testing it - what sorts of problems does it > cause?
Usually when you parse an Unicode Excel file, you get a bunch of warnings looking like: Character in 'C' format wrapped in pack at [...]/Spreadsheet/ParseExcel/FmtDefault.pm line 68. With the Unicode reader turned on, this doesn't happen. ( See http://www.annocpan.org/~KWITKNR/Spreadsheet-ParseExcel-0.2602/ParseExcel.pm #note_626 ) Show quoted text
> Thanks, > > Tony
-- Gunther
Subject: Re: [rt.cpan.org #17914] Spreadsheet::ParseExcel::Simple and Unicode
Date: Wed, 22 Mar 2006 17:03:08 +0000
To: DI Gunther Schmidl via RT <bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org>
From: Tony Bowden <tony [...] tmtm.com>
Download (untitled) / with headers
text/plain 544b
On Wed, Mar 22, 2006 at 09:57:07AM -0500, DI Gunther Schmidl via RT wrote: Show quoted text
> Usually when you parse an Unicode Excel file, you get a bunch of warnings > looking like: > Character in 'C' format wrapped in pack at > [...]/Spreadsheet/ParseExcel/FmtDefault.pm line 68. > With the Unicode reader turned on, this doesn't happen.
OK. Should be easy enough to catch by setting $SIG{__WARN__} and calling fail() if there are any warnings. If it's not something you know (or can work out) how to do I'll have a look at it at some stage. Thanks, Tony
Subject: AW: [rt.cpan.org #17914] Spreadsheet::ParseExcel::Simple and Unicode
Date: Thu, 23 Mar 2006 09:42:41 +0100
To: <bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org>
From: "DI Gunther Schmidl" <schmidl [...] webdynamite.com>
Download (untitled) / with headers
text/plain 894b
tony@tmtm.com via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=17914 > > > On Wed, Mar 22, 2006 at 09:57:07AM -0500, DI Gunther Schmidl via RT > wrote:
>> Usually when you parse an Unicode Excel file, you get a bunch of >> warnings looking like: Character in 'C' format wrapped in pack at >> [...]/Spreadsheet/ParseExcel/FmtDefault.pm line 68. >> With the Unicode reader turned on, this doesn't happen.
> > OK. Should be easy enough to catch by setting $SIG{__WARN__} and > calling fail() if there are any warnings. If it's not something you > know (or can work out) how to do I'll have a look at it at some stage.
The strange thing is that all of this is a cosmetic issue -- the warning does not seem to impede the actual processing of the spreadsheet at all. I was just sick of having people using my script asking about the pack "errors", so I added the fix. -- Gunther


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.