Excel::TemplateTemplating Excel files | |
Download |
Excel::Template Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Jens Gassmann
- Publisher web site:
- http://search.cpan.org/~jegade/
Excel::Template Tags
Excel::Template Description
Templating Excel files Excel::Template is a Perl module used for templating Excel files. Its genesis came from the need to use the same datastructure as HTML::Template, but provide Excel files instead. The existing modules don't do the trick, as they require replication of logic that's already been done within HTML::Template.SYNOPSISFirst, make a template. This is an XML file, describing the layout of the spreadsheet.For example, test.xml: < workbook > < worksheet name="tester" > < cell text="$HOME" / > < cell text="$PATH" / > < /worksheet > < /workbook >Now, create a small program to use it: #!/usr/bin/perl -w use strict; use Excel::Template; # Create the Excel template my $template = Excel::Template->new( filename => 'test.xml', ); # Add a few parameters $template->param( HOME => $ENV{HOME}, PATH => $ENV{PATH}, ); $template->write_file('test.xls');If everything worked, then you should have a spreadsheet called text.xls in your working directory that looks something like: A B C +----------------+----------------+---------------- 1 | /home/me | /bin:/usr/bin | +----------------+----------------+---------------- 2 | | | +----------------+----------------+---------------- 3 | | | Requirements: · Perl
Excel::Template Related Software