Revision history for Perl distribution Excel::Template
-0.20 Wed Jan 26 12:00:00 2004
+0.21 Wed Feb 24 14:00:00 2005
+ - Fixed documentation bug in BACKREF (Thanks to Paul Williams)
+ - Added code to Makefile.PL to skip .swp files in the Makefile
+ - Added RENDERER option to new()
+ - Deprecated BIG_FILE
+ - Added pod.t and pod_coverage.t
+
+0.20 Wed Jan 26 12:00:00 2005
- Removed PM_FILTER by adding an optional USE_UNICODE runtime parameter.
- Added a "type" attribute to CELL to allow printing by the write_*() family
t/014.xml
t/015_cell_type.t
t/015.xml
+t/016_renderers.t
+t/016.xml
+t/pod.t
+t/pod_coverage.t
t/mock.pm
t/Spreadsheet/WriteExcel.pm
+t/Spreadsheet/WriteExcelXML.pm
t/Spreadsheet/WriteExcel/Worksheet.pm
+t/Spreadsheet/WriteExcel/Big.pm
Makefile.PL
META.yml Module meta-data (added by MakeMaker)
+use strict;
+
use ExtUtils::MakeMaker;
-# See lib/ExtUtils/MakeMaker.pm for details of how to influence
-# the contents of the Makefile that is written.
+{
+ no strict 'refs';
-use strict;
+ my $libscan = \&{"ExtUtils::MM_Any::libscan"};
+ *{"ExtUtils::MM_Any::libscan"} = sub {
+ return '' unless $libscan->(@_);
+ return '' if $_[1] =~ /\.swp$/;
+ return $_[1];
+ };
+}
my $prereqs = {
'Spreadsheet::WriteExcel' => 0.42,
WriteMakefile(
NAME => 'Excel::Template',
VERSION_FROM => 'lib/Excel/Template.pm', # finds $VERSION
- AUTHOR => 'Rob Kinyon (rob.kinyon@gmail.com)',
ABSTRACT => 'Excel::Template',
PREREQ_PM => $prereqs,
+ ($] >= 5.005 ?
+ (ABSTRACT_FROM => 'lib/Excel/Template.pm',
+ AUTHOR => 'Rob Kinyon (rob.kinyon@gmail.com)') : ()),
);
unshift @renderer_classes, 'Spreadsheet::WriteExcel::Big';
}
+ if (exists $self->{XML} && $self->{XML})
+ {
+ unshift @renderer_classes, 'Spreadsheet::WriteExcelXML';
+ }
+
$self->{RENDERER} = undef;
foreach my $class (@renderer_classes)
{
Now, create a small program to use it:
#!/usr/bin/perl -w
- use Excel::Template
+ use Excel::Template;
# Create the Excel template
my $template = Excel::Template->new(
new() accepts an optional BIG_FILE parameter. This will attempt to change the
renderer from L<Spreadsheet::WriteExcel> to L<Spreadsheet::WriteExcel::Big>. You
-must already have L<Spreadsheet::WriteExcel::Big> installed on your system.
+must already have L<OLE::Storage_Lite> (required by Spreadsheet::WriteExcel::Big) installed on your system.
new() also accepts an optional USE_UNICODE parameter. This will use
L<Unicode::String> to represent strings instead of Perl's internal string
The USE_UNICODE parameter will be ignored if you are using Perl 5.8 or higher as
Perl's internal string handling is unicode-aware.
-NOTE: L<Spreadsheet::WriteExcel::Big> and mod_perl clash for some reason. This
-is outside of my control.
+NOTE: Certain older versions of L<OLE::Storage_Lite> and mod_perl clash for some
+reason. Upgrading to the latest version of L<OLE::Storage_Lite> should fix the
+problem.
=head2 param()
<cell ref="this_cell"/><cell ref="that_cell"><cell ref="that_cell">
</row>
<row>
- <formula>=<ref ref="this_cell">+<ref ref="that_cell"></formula>
+ <formula>=<backref ref="this_cell">+<backref ref="that_cell"></formula>
</row>
The formula in row 2 would be =A1+C1. C1 is the last to reference "that_cell".
{
local $" = "', '";
- push @mock::calls, __PACKAGE__ . "::new( '@_' )";
+ push @mock::calls, ref($self) . "::new( '@_' )";
}
return $self;
}
sub close {
- shift;
+ my $self = shift;
{
local $" = "', '";
- push @mock::calls, __PACKAGE__ . "::close( '@_' )";
+ push @mock::calls, ref($self) . "::close( '@_' )";
}
}
sub add_worksheet {
- shift;
+ my $self = shift;
{
local $" = "', '";
- push @mock::calls, __PACKAGE__ . "::add_worksheet( '@_' )";
+ push @mock::calls, ref($self) . "::add_worksheet( '@_' )";
}
return Spreadsheet::WriteExcel::Worksheet->new;
}
my $format_num = 1;
sub add_format {
- shift;
+ my $self = shift;
my %x = @_;
my @x = map { $_ => $x{$_} } sort keys %x;
{
local $" = "', '";
- push @mock::calls, __PACKAGE__ . "::add_format( '@x' )";
+ push @mock::calls, ref($self) . "::add_format( '@x' )";
}
return $format_num++;
}