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: 33662
Status: resolved
Worked: 5 hours (300 min)
Priority: 0/
Queue: Spreadsheet-WriteExcel

People
Owner: Nobody in particular
Requestors: RBS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.20
Fixed in: 2.21



Subject: hiding rows does not close outline folds
First off, thanks for a really useful module. The documentation's recommended way of writing an outline with closed outline section is to hide the rows in that section of the outline. However, with OpenOffice (at least), this merely hides the rows and the outline button still shows a "-" as though the rows were open. Clicking the "-" once turns the button in to a "+" button, just as though the outline section had been open and is now closed. Clicking the "+" button shows all of the rows.
Hi, I hadn't noticed that. It behave slightly incorrectly in Gnumeric as well even though it is okay in Excel. I think I know what causes it but it may not be easy to fix. I'll let you know. Thanks, John. --
On Thu Feb 28 09:15:17 2008, RBS wrote: Show quoted text
> First off, thanks for a really useful module. > > The documentation's recommended way of writing an outline with closed > outline section is to hide the rows in that section of the outline. > > However, with OpenOffice (at least), this merely hides the rows and the > outline button still shows a "-" as though the rows were open.
Hi, I've had a look at this in some more detail. There is an additional internal flag required in the file format for the last row/column of a collapsed group. Excel doesn't strictly require it but OpenOffice and Gnumeric appear to expect it. Therefore, I've added an addition "collapsed" parameter to the set_row() and set_column() methods to allow greater fidelity with Excel. I've added it to the beta of the next Spreadsheet::WriteExcel release which you can download from here: http://homepage.eircom.net/~jmcnamara/perl/prerel/Spreadsheet-WriteExcel-2.20.01.tar.gz See the updated outline.pl program in the examples dir as well as the new outline_collapsed.pl program and the updated docs for set_row(), set_column() and "Outlines And Grouping In Excel". I've tested it with OpenOffice and Gnumeric but let me know if you encounter any further problems. John. --
Fixed in version 2.21. Use additional $collapse parameter in set_row() and set_column() to indicate the row/column with the collapsed symbol. See updated docs and examples. John. --
Subject: Re: [rt.cpan.org #33662] hiding rows does not close outline folds
Date: Mon, 10 Mar 2008 09:44:02 -0400
To: bug-Spreadsheet-WriteExcel [...] rt.cpan.org
From: Barrie Slaymaker <barries [...] slaysys.com>
Thanks, John, both v.2.20.05 and v2.21 work perfectly. To others reading along, the subtlety that $collapsed needs to be set on the summary/containing row, not the hidden rows, is key. It's correctly documented, I just missed this detail on first read. Here's the code I'm using for an outline spreadsheet writer where the summary row is above the collapsed section (as opposed to outline.pl's "summary row below"): $worksheet->set_row( $row_number, $row_height, undef, $hidden, $depth ); $worksheet->set_row( ## Set parent row to be collapsed. $row_number - 1, undef, undef, undef, undef, 1 ) if $hidden; - Barrie