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: |
jmcnamara [...] cpan.org
|
Requestors: |
asad_ali1 [...] yahoo/com
|
Cc: |
|
AdminCc: |
|
|
Severity: |
Normal |
Broken in: |
(no value)
|
Fixed in: |
(no value)
|
|
Tue Feb 24 09:25:44 2004
Guest - Ticket created
Tried on
1. perl, v5.8.0 built for MSWin32-x86-multi-thread on W2K and WIN ME
2. perl, v5.6.0 built for sun4-solaris on SunOS 7 5.5.1 Generic_103640-42 (Solaris 2.5.1)
Used: Spreadsheet-WriteExcel-0.42
Snippet Code Used:
use Spreadsheet::WriteExcel::Big;
$XXX = $ARGV[0]; # passed 0010010
$workbook = Spreadsheet::WriteExcel::Big->new('test.xls');
$CharFormat = $workbook->addformat();
$CharFormat->set_num_format('@');
$worksheet = $workbook->add_worksheet();
$worksheet->write($row, $iCounter, $XXX, $CharFormat);
$workbook->close();
Though the column is formatted as text, but leading zero's are dropped. If " " is prefix or postfixed, it works
Tue Feb 24 18:36:12 2004
jmcnamara [...] cpan.org - Taken
Tue Feb 24 18:38:50 2004
jmcnamara [...] cpan.org - Status changed from 'new' to 'resolved'
Tue Feb 24 18:39:36 2004
jmcnamara [...] cpan.org - Status changed from 'resolved' to 'open'
Tue Feb 24 18:40:17 2004
jmcnamara [...] cpan.org - Status changed from 'open' to 'resolved'
Fri Feb 27 09:40:47 2004
Guest - Correspondence added
Hi:
Wondering if the fix is some thing that I can apply at my end or do I
have to wait for the next release. FYI I am novice when it comes to
perl.
Thanks
Ps. Sorry about the typo in the email earlier.
[guest - Tue Feb 24 09:25:44 2004]:
Show quoted text> Tried on
> 1. perl, v5.8.0 built for MSWin32-x86-multi-thread on W2K and WIN ME
> 2. perl, v5.6.0 built for sun4-solaris on SunOS 7 5.5.1
> Generic_103640-42 (Solaris 2.5.1)
>
> Used: Spreadsheet-WriteExcel-0.42
>
> Snippet Code Used:
>
> use Spreadsheet::WriteExcel::Big;
> $XXX = $ARGV[0]; # passed 0010010
> $workbook = Spreadsheet::WriteExcel::Big->new('test.xls');
> $CharFormat = $workbook->addformat();
> $CharFormat->set_num_format('@');
> $worksheet = $workbook->add_worksheet();
> $worksheet->write($row, $iCounter, $XXX, $CharFormat);
> $workbook->close();
>
> Though the column is formatted as text, but leading zero's are
> dropped. If " " is prefix or postfixed, it works
Fri Feb 27 09:40:47 2004
The RT System itself - Status changed from 'resolved' to 'open'
Mon Mar 01 18:29:24 2004
jmcnamara [...] cpan.org - Status changed from 'open' to 'resolved'
Mon Mar 01 18:29:24 2004
jmcnamara [...] cpan.org - Correspondence added
The above solution involving keep_leading_zeros() is available in the
current release.
Fri May 28 18:26:54 2004
jmcnamara [...] cpan.org - Correspondence added
First off, my apologies. I posted a response as a "comment" instead of a
"reply" so you probably didn't see it. Here is the original message for
the record.
This isn't a bug. It is mainly a feature of the way Excel behaves.
There is a explanation of why this happens and how to avoid it in the
keep_leading_zeros() section of the Spreadsheet::WriteExcel
documentation. See:
http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel/WriteExcel.pm#keep_leading_zeros()
John.
--
Fri May 28 18:26:55 2004
The RT System itself - Status changed from 'resolved' to 'open'