Excel:...e::Plus(3pm)
๐ธ Excel::Template::Plus ๐
the Excel::Template glow-up bestie โ aka Excel::Template::Plus, an extension to the Excel::Template module. Perl, user contributed, iconic.
โจ SYNOPSIS โจ
okay so literally the whole vibe in one snippet:
use Excel::Template::Plus;
my $template = Excel::Template::Plus->new(
engine => 'TT',
template => 'greeting.tmpl',
config => { INCLUDE => [ '/templates' ] },
params => { greeting => 'Hello' }
);
$template->param(location => 'World');
$template->write_file('greeting.xls');
like. she does it all. ๐ซถ
โ ๏ธ DISCLAIMER โ ๏ธ
ngl bestie, this is the very first release of this module ๐ญ it's an idea that the author and Rob Kinyon (the author of Excel::Template) had discussed many times, but never got around to doing. this is the first attempt at bringing this to reality, and it may change radically as it evolves, so be warned. ๐
fr fr. early days energy. buckle up. ๐
๐ DESCRIPTION ๐
so this module is an extension of the Excel::Template module, which lets you use various "engines" from which you can create Excel files through Excel::Template.
the idea is giving main character energy to the existing (and very solid, no cap) excel file generation code in Excel::Template, but extending its more templatey bits with more powerful options. โจ
the only engine currently provided is the Template Toolkit engine, which replaces Excel::Template's built in template features (the LOOP, and IF constructs) with the full power of TT. this is similar to the module Excel::Template::TT, but expands on that even further to try and create a more extensive system. obsessed.
you can use this module to create Excel::Template-compatible XML files using one of the supported engines. for example, with the TT engine you could create a Excel::Template XML file like:
<workbook>
<worksheet name="[% worksheet_name %]">
[% my_cols = get_list_of_columns %]
<row>
[% FOR col = my_cols %]
<bold><cell>[% col %]</cell></bold>
[% END %]
</row>
[% FOR my_row = get_list_of_objects %]
<row>
[% FOR col = my_cols %]
<cell>[% my_row.$col %]</cell>
[% END %]
</row>
[% END %]
</worksheet>
</workbook>
your TT template thus creates a XML file suitable to handing over to Excel::Template for processing. and Excel::Template::Plus simplifies the template-creation and handing-over process. she's helpful like that. ๐
๐ฎ Future engine/plans include: ๐ฎ
- Pure Perl โ this would allow you to write you
Excel::Templatefiles using Perl itself which would then output the XML forExcel::Templateto consume. this would be modeled after the recently releasedTemplate::Declaremodule perhaps. - TT Plugins/Macros/Wrappers โ this is basically anything which will make the TT engine easier to write templates for. the author has experimented with some of these things, but was not happy with any of them enough to release them yet. ๐
- HTML::Template โ
Excel::Template's templating features are based onHTML::Template, but theHTML::Templateplugins and other goodies are not compatible. this engine would bring those things toExcel::Template. ๐ฆ
๐ ๏ธ METHODS ๐ ๏ธ
new (%options)โ this method basically serves as a factory for creating new engine instances (for whichExcel::Template::Plus::TTis the only one currently). the only parameter that it requires isengine, all other parameters are passed onto the engine's constructor (see the individual docs for more details on what is required). โจmetaโ access to the metaclass. short, sweet, iconic. ๐
๐ BUGS ๐
all complex software has bugs lurking in it, and this module is no exception. ๐ญ if you find a bug please either email the author, or add the bug to cpan-RT.
๐ ACKNOWLEDGEMENTS ๐
this module came out of several discussions the author had with Rob Kinyon. friendship wins fr fr. ๐ซถ
๐ AUTHOR ๐
Stevan Little <stevan@cpan.org>
๐ COPYRIGHT AND LICENSE ๐
Copyright 2007-2014 by Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page bestie, no crumbs left ๐
this was Excel:...e::Plus(3pm), the User Contributed Perl Documentation, from perl v5.34.0, dated 2022-06-13. slay, bye! ๐โจ๐
๐ฆ where this page comes from
- debian bookworm: libexcel-template-plus-perl 0.06-2 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libexcel-template-plus-perl 0.06-2 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libexcel-template-plus-perl 0.06-2 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libexcel-template-plus-perl 0.06-2 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libexcel-template-plus-perl 0.06-2 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms