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

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

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



Subject: Feature request: get_format($row, $cell), set_cell($row, $cell, $format)
One of the limitations of Spreadsheet::WriteExcel that others[1] and I have run into is that formats are not additive. I.e. after I generated a worksheet, I want to set the top border of the first row to 2. That's not currently possible. One would need to store the formats for each cell of that row, then mix them with the "top => 2" format, producing a new format.

One way to alleviate this would be to retrieve the format of a given cell, then assign a new format for the cell:

    my $format = $worksheet->get_format($row, $col);
    $format->set_top(2);
    $worksheet->set_cell($row, $col, $format);

Would it be possible to implement these two methods?

[1] http://groups.google.com/group/spreadsheet-writeexcel/browse_thread/thread/9499cf633e327107/6e3c23c71b1fb454


Hope that helps,
Dan Dascalescu
--
http://wiki.dandascalescu.com/.list/Perl
On Tue Sep 07 19:31:19 2010, dandv wrote: Show quoted text
> One of the limitations of Spreadsheet::WriteExcel that others[1] and I > have run > into is that formats are not additive. I.e. after I generated a > worksheet, I > want to set the top border of the first row to 2. That's not currently > possible.
Hi Dan, Something like that is planned for the next incarnation of Spreadsheet::WriteExcel which will target the xlsx format (which is currently under way). I plan to decouple the formatting from the data so that they both can be written separately if required. Formatting will also be additive is required so that several formats can be applied to a cell. John. --
Closing this issue. Can't fix. May be added to a future version of Excel::Writer::XLSX instead.