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

People
Owner: Nobody in particular
Requestors: sphadke [...] umich.edu
Cc:
AdminCc:

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



Subject: charts bug with worksheet names starting with a number
Date: Thu, 22 Jul 2010 18:10:38 -0400
To: bug-Spreadsheet-WriteExcel [...] rt.cpan.org
From: Sujay Phadke <sphadke [...] umich.edu>
Hello, I have been using Spreadsheet::WriteExcel::Chart (2.37) for some time now. I think there is a bug. If I create a new worksheet with a name starting with a number (say '1a') and then try to create a chart in it, the chart is blank. the worksheet itself is created and I can dump data into it. But the chart does not get created correctly. There is just a blank white box and the chart is empty. The bug happens for embedded as well as non-embedded charts. example code: #!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( 'temp.xls' ); my $worksheet = $workbook->add_worksheet('1a'); my $chart = $workbook->add_chart( type => 'line', embedded => 1 ); # Configure the chart. $chart->add_series( categories => '=_1a!$A$2:$A$7', values => '=_1a!$B$2:$B$7', ); # Add the worksheet data the chart refers to. my $data = [ [ 'Category', 2, 3, 4, 5, 6, 7 ], [ 'Value', 1, 4, 5, 2, 1, 5 ], ]; $worksheet->write( 'A1', $data ); $worksheet->insert_chart('A15', $chart, 0, 0, 1, 1); --------- Best, Sujay
Hi, I guess that _1a in the formulas is a typo and you meant 1a. In Excel sheet names that contain special characters or start with number need to be single quotes. For example if you examine the spreadsheet in Excel you will see that the syntax for the charts is: =SERIES(,'1a'!$A$2:$A$7,'1a'!$B$2:$B$7,1) In WriteExcel you also need to single quote the sheet name using the same rules as Excel. For example in your case: # Configure the chart. $chart->add_series( categories => q{='1a'!$A$2:$A$7}, values => q{='1a!$B$2:$B$7}, ); However, a better approach is to use the xl_range_formula() function to define the range. See the following for more information: http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel-2.37/lib/Spreadsheet/WriteExcel/Chart.pm#Working_with_Cell_Ranges John. --
Not a WriteExcel issue. Closing.
Subject: Re: [rt.cpan.org #59628] Resolved: charts bug with worksheet names starting with a number
Date: Fri, 6 Aug 2010 10:24:20 -0400
To: <bug-Spreadsheet-WriteExcel [...] rt.cpan.org>
From: "Sujay Phadke" <sphadke [...] umich.edu>
Hi John, If its not a writeexcel charts issue, then what is it? In excel I can manually create a worksheet starting with a number and put a chart in it. Sujay Show quoted text
----- Original Message ----- From: "John McNamara via RT" <bug-Spreadsheet-WriteExcel@rt.cpan.org> To: <sphadke@umich.edu> Sent: Friday, August 06, 2010 10:04 AM Subject: [rt.cpan.org #59628] Resolved: charts bug with worksheet names starting with a number
> <URL: https://rt.cpan.org/Ticket/Display.html?id=59628 > > > According to our records, your request has been resolved. If you have any > further questions or concerns, please respond to this message. > > >
Hi Did you see my explanation or only the close email? If it is the latter then check out the explanation on the RT page. Show quoted text
> If its not a writeexcel charts issue, then what is it? In excel I can > manually create a worksheet starting with a number and put a chart in it.
Yes, but Excel requires that the worksheet name is quoted. "=1a!$A$2:$A$7" is not a valid formula in Excel. It has to be written as "'='1a'!$A$2:$A$7". The same applies to WriteExcel. John. --
See full explanation online.
Subject: Re: [rt.cpan.org #59628] Resolved: charts bug with worksheet names starting with a number
Date: Tue, 10 Aug 2010 14:45:56 -0400
To: bug-Spreadsheet-WriteExcel [...] rt.cpan.org
From: Sujay Phadke <sphadke [...] umich.edu>
Thanks for the explanation John. I got it now! I must congratulate you for this excellent tool! Looking forward to more! Sujay On Fri, 2010-08-06 at 10:04 -0400, John McNamara via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=59628 > > > According to our records, your request has been resolved. If you have any > further questions or concerns, please respond to this message. > >