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

People
Owner: Nobody in particular
Requestors: hrustyashko [...] yandex-team.ru
Cc:
AdminCc:

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



Subject: Bug in the create chart with data in an page
Spreadsheet throws exception when creating a xls with charts, data for which are listed on name page in utf8 encoding. Example $chart->add_series( categories => '=Страница1!$F$4:$F$19', values => '=Страница1!$C$4:$C$19', name => 'Chart', ); Fix: --- Spreadsheet-WriteExcel-2.37-orig/lib/Spreadsheet/WriteExcel/Worksheet.pm 2011-02-18 15:53:33.000000000 +0300 +++ Spreadsheet-WriteExcel-2.37/lib/Spreadsheet/WriteExcel/Worksheet.pm 2011-02-18 15:55:24.000000000 +0300 @@ -5857,16 +5857,20 @@ # Simulate the EXTERNSHEET link between the chart and data using a formula # such as '=Sheet1!A1'. # TODO. Won't work for external data refs. Also should use a more direct # method. # - my $formula = "='$self->{_name}'!A1"; - $self->store_formula($formula); + my $name = $self->{_name}; + if ($self->{_encoding} && $] >= 5.008) { + require Encode; + $name = Encode::decode('UTF-16BE', $name); + } + $self->store_formula("='$name'!A1"); $self->{_object_ids}->[0] = $spid; }
Subject: spreadsheet-2.37-1.diff
--- Spreadsheet-WriteExcel-2.37-orig/lib/Spreadsheet/WriteExcel/Worksheet.pm 2011-02-18 15:53:33.000000000 +0300 +++ Spreadsheet-WriteExcel-2.37/lib/Spreadsheet/WriteExcel/Worksheet.pm 2011-02-18 15:55:24.000000000 +0300 @@ -5857,16 +5857,20 @@ # Simulate the EXTERNSHEET link between the chart and data using a formula # such as '=Sheet1!A1'. # TODO. Won't work for external data refs. Also should use a more direct # method. # - my $formula = "='$self->{_name}'!A1"; - $self->store_formula($formula); + my $name = $self->{_name}; + if ($self->{_encoding} && $] >= 5.008) { + require Encode; + $name = Encode::decode('UTF-16BE', $name); + } + $self->store_formula("='$name'!A1"); $self->{_object_ids}->[0] = $spid; } ############################################################################### # @@ -7624,11 +7628,11 @@ =head1 AUTHOR John McNamara jmcnamara@cpan.org =head1 COPYRIGHT -© MM-MMX, John McNamara. +� MM-MMX, John McNamara. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
On Mon Mar 28 04:14:48 2011, hrustyashko wrote: Show quoted text
> > Spreadsheet throws exception when creating a xls with charts, data for > which are listed on name page in utf8 encoding. Example
Hi Alexey, Thanks for that. I'll patch it and roll the changes into the next release. If you have time could you try the new Excel::Writer::XLSX charts and let me know if you encounter any issues: http://groups.google.com/group/spreadsheet-writeexcel/browse_thread/thread/99e8ada2d92aba2d I've tested it with Cyrillic UTF8 worksheet names and it seems okay but you would be in a better position to test it fully. If you have time. John. --
Fixed in version 2.38. On its way to CPAN. Thanks.