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.
Owner: |
Nobody in particular
|
Requestors: |
mariusz.luther [...] t-online.de
|
Cc: |
|
AdminCc: |
|
|
Severity: |
(no value)
|
Broken in: |
(no value)
|
Fixed in: |
(no value)
|
demo501.bin
demo5mjl.pl
demo5mjl.xls
envmjl.log
OpenOffice.org.png
|
Wed Jan 25 20:09:24 2012
mariusz.luther [...] t-online.de - Ticket created
I want to use the same chart (extracted the usual way from an XLS file)
with different worksheets inside the same workbook. It turns out that
all charts in the different worksheets refer to the data of the first
worksheet.
I have eveb tried to make copies of the chart BIN file to force the use
of different chart import files, but the result remained the same.
I've attached the example demonstrating the effect derived from demo5.pl
as demo5mjl.pl, with the resulting XLS file demo5mjl.xls, the
"information on your system, version of perl and module versions" in
envmjl.log, and the version information about OpenOffice used to look at
the resulting XLS file in OpenOffice.org.png.
Regards
Mariusz J. Luther
Message body is not shown because sender requested not to inline it.
Message body not shown because it is not plain text.
Message body not shown because it is not plain text.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.
Thu Jan 26 06:25:49 2012
jmcnamara [...] cpan.org - Correspondence added
On Wed Jan 25 20:09:24 2012, mariusz.luther@t-online.de wrote:
Show quoted text> I want to use the same chart (extracted the usual way from an XLS
file)
Show quoted text> with different worksheets inside the same workbook. It turns out that
> all charts in the different worksheets refer to the data of the first
> worksheet.
Hi,
That unfortunately is the problem and the major limitation of using the
external chart solution in Spreadsheet::WriteExcel.
The chart bin objects that are extracted from Excel each contain links
to the worksheet data that they refer to. In your case the extracted
chart refers to the data in Sheet1. Unfortunately, if you then try to
add the same chart to Sheet2 you don't get the expected behaviour
because the internal data links are still pointing to Sheet1. Dropping
it into a different worksheet doesn't make it point to the local data.
In order to do what you want you would have to generated a template
workbook with several sheets and individual charts on each one. You
would then have to extact each of the chart objects and use them only
for the worksheet that they refer to.
External chart template in Spreadsheet::WriteExcel were only ever meant
to be a temporary workaround and their use is deprecated.
Instead I would recommend using Spreadsheet::WriteExcel native charts:
http://search.cpan.org/~jmcnamara/Spreadsheet-
WriteExcel/lib/Spreadsheet/WriteExcel/Chart.pm
Or better still Excel::Writer::XLSX charts which have more
functionality.
Regards,
John.
--
Thu Jan 26 06:25:51 2012
The RT System itself - Status changed from 'new' to 'open'
Thu Jan 26 15:59:22 2012
mariusz.luther [...] t-online.de - Correspondence added
On Do, 2012-01-26 at 06:25 -0500, John McNamara via RT wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=74408 >
>
> On Wed Jan 25 20:09:24 2012, mariusz.luther@t-online.de wrote:
> > I want to use the same chart (extracted the usual way from an XLS
> file)
> > with different worksheets inside the same workbook. It turns out that
> > all charts in the different worksheets refer to the data of the first
> > worksheet.
>
> Hi,
>
> That unfortunately is the problem and the major limitation of using the
> external chart solution in Spreadsheet::WriteExcel.
>
> The chart bin objects that are extracted from Excel each contain links
> to the worksheet data that they refer to. In your case the extracted
> chart refers to the data in Sheet1. Unfortunately, if you then try to
> add the same chart to Sheet2 you don't get the expected behaviour
> because the internal data links are still pointing to Sheet1. Dropping
> it into a different worksheet doesn't make it point to the local data.
>
> In order to do what you want you would have to generated a template
> workbook with several sheets and individual charts on each one. You
> would then have to extact each of the chart objects and use them only
> for the worksheet that they refer to.
>
> External chart template in Spreadsheet::WriteExcel were only ever meant
> to be a temporary workaround and their use is deprecated.
>
> Instead I would recommend using Spreadsheet::WriteExcel native charts:
>
>
http://search.cpan.org/~jmcnamara/Spreadsheet-
> WriteExcel/lib/Spreadsheet/WriteExcel/Chart.pm
>
> Or better still Excel::Writer::XLSX charts which have more
> functionality.
>
> Regards,
>
> John.
Hi John,
thank you very much for your response. I wasn't aware of the limitations
of that package.
I'll try first your first suggestion to get a result in the least time I
can spend. The problem with using Excel::Writer::XLSX is that I'm using
still MS Office 2002 on the windows side, and will be changing to MS
Office 2010 some time this year. Anyway, XLSX seems to be the best path
into the future, I'll be preparing for it.
Tanks again for the very short reaction time, which definitely beats
every response time expected from any commercial product. Feel free to
close my bug report, as I've enough information to avoid my problem.
Regards
Mariusz
Fri Jan 27 05:08:08 2012
jmcnamara [...] cpan.org - Correspondence added
Hi,
Thanks for the feedback.
I'll close this issue now.
Regards,
John.
--
Fri Jan 27 05:08:08 2012
jmcnamara [...] cpan.org - Status changed from 'open' to 'resolved'