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

People
Owner: Nobody in particular
Requestors: ddascalescu+perl [...] gmail.com
Cc:
AdminCc:

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



Subject: Spurious error writing undef formulas
Show quoted text
use strict;
use Spreadsheet::WriteExcel;

my $workbook = Spreadsheet::WriteExcel->new("bug.xls");
my $worksheet = $workbook->add_worksheet();
$worksheet->write_formula(0, 0, undef);

will produce the following error:

Use of uninitialized value $_[0] in substr at C:/strawberry/perl/site/lib/Parse/RecDescent.pm line 3130.
Use of uninitialized value $text in length at C:/strawberry/perl/site/lib/Parse/RecDescent.pm line 2860.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 1053.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 1053.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 1673.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 1673.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 6431.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 6431.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 3531.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 3531.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 3607.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 3607.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 1519.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 1519.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 397.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 397.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 4448.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 4448.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 6045.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 6045.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 6121.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 6121.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 551.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 551.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 654.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 654.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 814.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 814.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 4859.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 4859.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 2399.
Use of uninitialized value $text in substitution (s///) at (eval 50) line 2399.
Use of uninitialized value $formula in concatenation (.) or string at C:/strawberry/perl/site/lib/Spreadsheet/WriteExcel/Formula.pm line 249.
Couldn't parse formula: = at $0 line 7

On Wed Sep 22 06:40:37 2010, dandv wrote: Show quoted text
> use strict; > use Spreadsheet::WriteExcel; > > my $workbook = Spreadsheet::WriteExcel->new("bug.xls"); > my $worksheet = $workbook->add_worksheet(); > $worksheet->write_formula(0, 0, undef);
Hi Dan, I'll put in a fix for that and push it to GitHub. Thanks, John. --
Fixed in version 2.38. On its way to CPAN. Thanks.