Skip Menu |

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

Maintainer(s)' notes

If you are reporting a bug in Spreadsheet::WriteExcel 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::WriteExcel
                      Parse::RecDescent
                      File::Temp
                      OLE::Storage_Lite
                      IO::Stringy
                      Spreadsheet::ParseExcel
                      Scalar::Util
                      Unicode::Map
                    );

    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::WriteExcel (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 but complete example program that demonstrates your problem. The program should be as small as possible. At the same time it should be a complete program that generates an Excel file. If the Spreadsheet::WriteExcel section is part of a much larger program then simplify it down to the essentials. Simulate any DB reads with an array.

5) Say if you tested with Excel, OpenOffice, Gnumeric or something else. Say which version of that application you used.

6) If you are submitting a patch you should check with the author 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::WriteExcel Google Group.

Report information
The Basics
Id: 53251
Status: resolved
Priority: 0/
Queue: Spreadsheet-WriteExcel

People
Owner: Nobody in particular
Requestors: amitguptainn [...] gmail.com
Cc:
AdminCc:

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



Subject: Error while entering SUMPRODUCT formula
 Hi,

When I tried to SUMPRODUCT formula in following way, I got error:

my $formula=$overview_sheet->store_formula("=SUMPRODUCT(--('".$project."'!F2:F12>DATE(2009,12,29)),--('".$project."'!G2:G12>DATE(2009,12,29)))");

Error was:
Couldn't parse formula: =SUMPRODUCT(--('project1'!F2:F12>DATE(2009,12,29)),--('project1'!G2:G12>DATE(2009,12,29))) at ./new_tickets_xls.pl line 43
        (in cleanup) Can't use an undefined value as a HASH reference at /tool/pandora/.package/perl-5.6.1/lib/site_perl/5.6.1/Spreadsheet/WriteExcel/Workbook.pm line 642 during global destruction.

Is this a limitation or known issue or bug?

Regards,

Amit
On Thu Dec 31 05:48:11 2009, amitguptainn wrote:

Show quoted text
> Error was:
> Couldn't parse formula:
> =SUMPRODUCT(--('project1'!F2:F12>DATE(2009,12,29)),--
> ('project1'!G2:G12>DATE(2009,12,29)))
> at ./new_tickets_xls.pl line 43 (in cleanup) Can't use an undefined
> value as a
> HASH reference at
> /tool/pandora/.package/perl-
> 5.6.1/lib/site_perl/5.6.1/Spreadsheet/WriteExcel/Workbook.pm
> line 642 during global destruction.
>
> Is this a limitation or known issue or bug?

Hi,

It is a limitation. The parser can't handle unary minus as stated in the documentation.

Try to re-arrange the formula to avoid the "--" construct.

John.
-- 

Subject: Re: [rt.cpan.org #53251] Error while entering SUMPRODUCT formula
Date: Thu, 31 Dec 2009 16:33:03 +0530
To: bug-Spreadsheet-WriteExcel [...] rt.cpan.org
From: Amit Gupta <amitguptainn [...] gmail.com>
Thanks a lot for quick response. I dont have much idea about this formula. I just learnt it from Google Can you please suggest me a way around? With regards, Amit Gupta Mobile: *+91-**9391427290* Hyderabad, India * * On Thu, Dec 31, 2009 at 16:31, John McNamara via RT < bug-Spreadsheet-WriteExcel@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=53251 > > > On Thu Dec 31 05:48:11 2009, amitguptainn wrote: >
> > Error was: > > Couldn't parse formula: > > =SUMPRODUCT(--('project1'!F2:F12>DATE(2009,12,29)),-- > > ('project1'!G2:G12>DATE(2009,12,29))) > > at ./new_tickets_xls.pl line 43 (in cleanup) Can't use an undefined > > value as a > > HASH reference at > > /tool/pandora/.package/perl- > > 5.6.1/lib/site_perl/5.6.1/Spreadsheet/WriteExcel/Workbook.pm > > line 642 during global destruction. > > > > Is this a limitation or known issue or bug?
> > Hi, > > It is a limitation. The parser can't handle unary minus as stated in the > documentation. > > Try to re-arrange the formula to avoid the "--" construct. > > John. > -- > >
Subject: Re: [rt.cpan.org #53251] Error while entering SUMPRODUCT formula
Date: Thu, 31 Dec 2009 16:55:36 +0530
To: bug-Spreadsheet-WriteExcel [...] rt.cpan.org
From: Amit Gupta <amitguptainn [...] gmail.com>
Thanks Google helped me again. Sent from Hyderabad, Andhra Pradesh, India With regards, Amit Gupta Mobile: *+91-**9391427290* Hyderabad, India * * On Thu, Dec 31, 2009 at 16:33, Amit Gupta <amitguptainn@gmail.com> wrote: Show quoted text
> Thanks a lot for quick response. I dont have much idea about this formula. > I just learnt it from Google Can you please suggest me a way around? > > > > With regards, > > Amit Gupta > Mobile: *+91-**9391427290* > Hyderabad, India > * > * > On Thu, Dec 31, 2009 at 16:31, John McNamara via RT < > bug-Spreadsheet-WriteExcel@rt.cpan.org> wrote: >
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=53251 > >> >> On Thu Dec 31 05:48:11 2009, amitguptainn wrote: >>
>> > Error was: >> > Couldn't parse formula: >> > =SUMPRODUCT(--('project1'!F2:F12>DATE(2009,12,29)),-- >> > ('project1'!G2:G12>DATE(2009,12,29))) >> > at ./new_tickets_xls.pl line 43 (in cleanup) Can't use an undefined >> > value as a >> > HASH reference at >> > /tool/pandora/.package/perl- >> > 5.6.1/lib/site_perl/5.6.1/Spreadsheet/WriteExcel/Workbook.pm >> > line 642 during global destruction. >> > >> > Is this a limitation or known issue or bug?
>> >> Hi, >> >> It is a limitation. The parser can't handle unary minus as stated in the >> documentation. >> >> Try to re-arrange the formula to avoid the "--" construct. >> >> John. >> -- >> >>
>