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: 36113
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Spreadsheet-WriteExcel

People
Owner: Nobody in particular
Requestors: d.t.rajan [...] ieee.org
Cc:
AdminCc:

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



Subject: set_bg_color() does not update in for loop
Date: Thu, 22 May 2008 14:48:42 -0700
To: bug-Spreadsheet-WriteExcel [...] rt.cpan.org
From: Darin <d.t.rajan [...] ieee.org>
Hello, Thank you for writing this module. I am experiencing a bug where the bg_color is not updated in a for loop. So the below example results in all the cells with a blue bg_color This seems to be a bug as I would rather not create a new format var for each color. ... @colors = @{$led_pattern_hash{$key}}; for ($i=0; $i<$#colors; $i++) { if (@colors[$i] == 0){ $led_color_format->set_bg_color('blue'); $led_sheet->write($row,3+$i, @colors[$i], $led_color_format); } elsif (@colors[$i] == 1){ $led_color_format->set_bg_color('red'); $led_sheet->write($row,3+$i, @colors[$i], $led_color_format); } elsif (@colors[$i] == 2){ $led_color_format->set_bg_color('green'); $led_sheet->write($row,3+$i, @colors[$i], $led_color_format); } } Thanks! -Darin
From: jmcnamara [...] cpan.org
On Thu May 22 17:49:08 2008, d.t.rajan@ieee.org wrote: Show quoted text
> Hello, > > Thank you for writing this module. > > I am experiencing a bug where the bg_color is not updated in a for
loop. So Show quoted text
> the below example results in all the cells with a blue bg_color > > This seems to be a bug as I would rather not create a new format var for > each color.
Hi, That isn't a bug. That is the documented behaviour for a format object: http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel/lib/Spreadsheet/WriteExcel.pm#Working_with_formats Each, unique colour will require a unique format object. If you have any further questions post them over at the Spreadsheet::WriteExcel forum: http://groups.google.com/group/spreadsheet-writeexcel P.S., in your code you should be writing $colors[$i] instead of @colors. :-) John. --
Subject: Re: [rt.cpan.org #36113] set_bg_color() does not update in for loop
Date: Thu, 22 May 2008 15:17:15 -0700
To: bug-Spreadsheet-WriteExcel [...] rt.cpan.org
From: Darin <d.t.rajan [...] ieee.org>
Hi John, Thanks for the pointer. I'm using Tie::Hash::MultiValue, which contains a bug in that it is returning the array ref for 'value'. Thanks for catching that -Darin On Thu, May 22, 2008 at 3:08 PM, John McNamara via RT < bug-Spreadsheet-WriteExcel@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=36113 > > > On Thu May 22 17:49:08 2008, d.t.rajan@ieee.org wrote:
> > Hello, > > > > Thank you for writing this module. > > > > I am experiencing a bug where the bg_color is not updated in a for
> loop. So
> > the below example results in all the cells with a blue bg_color > > > > This seems to be a bug as I would rather not create a new format var for > > each color.
> > Hi, > > That isn't a bug. That is the documented behaviour for a format object: > > > http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel/lib/Spreadsheet/WriteExcel.pm#Working_with_formats > > Each, unique colour will require a unique format object. > > If you have any further questions post them over at the > Spreadsheet::WriteExcel forum: > > http://groups.google.com/group/spreadsheet-writeexcel > > P.S., in your code you should be writing $colors[$i] instead of @colors. > :-) > > John. > -- > >
Sorry I should have written "$colors[$i] instead of @colors[$i]" above. John. --
Subject: Re: [rt.cpan.org #36113] set_bg_color() does not update in for loop
Date: Thu, 22 May 2008 15:21:33 -0700
To: bug-Spreadsheet-WriteExcel [...] rt.cpan.org
From: Darin <d.t.rajan [...] ieee.org>
np, i understood what you were pointing out. On Thu, May 22, 2008 at 3:20 PM, John McNamara via RT < bug-Spreadsheet-WriteExcel@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=36113 > > > Sorry I should have written "$colors[$i] instead of @colors[$i]" above. > > John. > -- > >