NAME
Excel::Template - Excel::Template
SYNOPSIS
use Excel::Template
my $template = Excel::Template->new(
filename => 'template.xml',
);
$template->param(%some_params);
$template->write_file('output.xls');
DESCRIPTION
This is a 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 separate logic from what HTML::Template needs.
Currently, only a small subset of the planned features are supported. This is meant to be a test of the waters, to see what features people actually want.
USAGE
new()
This creates a Excel::Template object. If passed a filename parameter, it will parse the template in the given file. (You can also use the parse() method, described below.)
param()
This method is exactly like HTML::Template's param() method. Although, I will be adding more to this section later, please see HTML::Template's description for info right now.
parse() / parse_xml()
This method actually parses the template file. It can either be called separately or through the new() call. It will die() if it cannot handle any situation.
write_file()
Create the Excel file and write it to the specified filename. This is when the actual merging of the template and the parameters occurs.
output()
It will act just like HTML::Template's output() method, returning the resultant file as a stream, usually for output to the web.
NOTE: This method binmode()'s STDOUT and passes a reference to the glob to write_file(). This has been tested using CGI, but not mod_perl 1 or mod_perl 2. If you test it under those environments, please let me know.
SUPPORTED NODES
This is just a list of nodes. See the other classes in this distro for more details on specific parameters and the like.
Every node can set the ROW and COL parameters. These are the actual ROW/COL values that the next CELL tag will write into.
WORKBOOK
WORKSHEET
LOOP
ROW
CELL
BOLD
IF
BUGS
None, that I know of. (But there aren't many features, neither!)
SUPPORT
This is currently beta-quality software. The featureset is extremely limited, but I expect to be adding on to it very soon.
If you have any suggestions, comments, or the like, please let me know. I'd also appeciate anyone coming up with a good testing strategy!
AUTHOR
Rob Kinyon
rkinyon@columbus.rr.com
COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
perl(1), HTML::Template, PDF::Template.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 285:
=back doesn't take any parameters, but you said =back 4