App-ZofCMS
view release on metacpan or search on metacpan
lib/App/ZofCMS/Plugin/DataToExcel.pm view on Meta::CPAN
text_wrap => 1,
calc_column_widths => 1,
width_multiplier => 1,
center_first_row => 1,
},
...
B<Optional>. Takes a hashref of arguments that specify how to format
the Excel file. See the I<third> argument for
L<Spreadsheet::DataToExcel>'s C<dump()>'s method for details.
B<By default is not specified>
=head3 C<trigger>
plug_data_to_excel => {
trigger => 1,
...
plug_data_to_excel => {
trigger => sub {
my ( $t, $q, $config ) = @_;
return $actual_value_for_trigger;
},
...
B<Optional>. Takes either true or false values, or a subref that
returns either true or false values. Plugin will run only if
C<trigger> is set to a true value. If set to a subref, the C<@_> of the
subref will contain C<$t>, C<$q>, and C<$config> (in that order), where
C<$t> is ZofCMS Template hashref, C<$q> is query parameter hashref, and
C<$config> is L<App::ZofCMS::Config> object. B<Defaults to:> C<1>
=head3 C<filename>
plug_data_to_excel => {
filename => 'ExcelData.xls',
...
B<Optional>. Takes a string as a value that specifies the filename
that the browser will propose to the user (when saving your Excel file).
B<Defaults to:> C<ExcelData.xls>
=head3 C<no_exit>
plug_data_to_excel => {
no_exit => 0,
...
B<Optional>. Takes either true or false values. When plugin
finishes outputting the Excel file to the user, it will call
C<exit()>, unless C<no_exit> is set to a true value. Should that be
the case, it is your responsibility to call C<exit()> at a later time;
although, OpenOffice didn't seem to mind extraneous HTML code added
to the Excel file. B<Defaults to:> C<0>
=head1 HTML::Template TEMPLATE VARIABLES
=head2 C<plug_data_to_excel_error>
<tmpl_if name='plug_data_to_excel_error'>
<tmpl_var escape='html' name='plug_data_to_excel_error'>
</tmpl_if>
Should an error occur (e.g. when you give the plugin invalid
C<data> argument), the plugin will place the description of
the error into C<plug_data_to_excel_error> key of C<{t}> ZofCMS
Template special key.
=head1 REQUIRED MODULES
The plugin requires the following modules/versions
App::ZofCMS::Plugin::Base => 0.0111,
Spreadsheet::DataToExcel => 0.0103,
=head1 REPOSITORY
Fork this module on GitHub:
L<https://github.com/zoffixznet/App-ZofCMS>
=head1 BUGS
To report bugs or request features, please use
L<https://github.com/zoffixznet/App-ZofCMS/issues>
If you can't access GitHub, you can email your request
to C<bug-App-ZofCMS at rt.cpan.org>
=head1 AUTHOR
Zoffix Znet <zoffix at cpan.org>
(L<http://zoffix.com/>, L<http://haslayout.net/>)
=head1 LICENSE
You can use and distribute this module under the same terms as Perl itself.
See the C<LICENSE> file included in this distribution for complete
details.
=cut
( run in 0.824 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )