
CatalystX::CRUD::View::Excel - view CRUD search/list results in Excel format

package MyApp::View::Excel;
use base qw( CatalystX::CRUD::View::Excel );
__PACKAGE__->config(
TEMPLATE_EXTENSION => 'tt',
etp_config => {
INCLUDE_PATH => [ 'my/tt/path', __PACKAGE__->path_to('root') ],
}
);
1;

CatalystX::CRUD::View::Excel makes it easy to export your search results as an Excel document. If you are using the other CatalystX::CRUD Controller and Model classes, your default end() method might look something like this:
sub end : ActionClass('RenderView') {
my ( $self, $c ) = @_;
if ( $c->req->param('as_xls') ) {
$c->stash->{current_view} = 'Excel';
}
}
and get a .xls document for any search or list by simply adding a as_xls=1 param pair to your url query.
NOTE: If you are paging results, then you will need to turn off paging in order to get all your results in a single .xls file. You can do this with the standard _no_page param as defined in the CatalystX::CRUD::Model API.

Overrides base new() method to set default INCLUDE and TEMPLATE_EXTENSION config values.
Overrides base process() method to call get_filename() and create template from results_template if a template file does not exist.
Search the TT include path to see if path really exists.
Overrides base method to change the default naming convention. If template is not set in stash(), then the default template path is:
$c->action . '.xls.' . $self->config->{TEMPLATE_EXTENSION}
TEMPLATE_EXTENSION by default is tt. You can alter that with the config() method.
Returns the name of the file to return in the response header Content-Disposition.
Returns results-specific template.

Peter Karman, <karman at cpan dot org>

Please report any bugs or feature requests to bug-catalystx-crud-view-excel at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CatalystX-CRUD-View-Excel. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

You can find documentation for this module with the perldoc command.
perldoc CatalystX::CRUD::View::Excel
You can also look for information at:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=CatalystX-CRUD-View-Excel

The Minnesota Supercomputing Institute http://www.msi.umn.edu/ sponsored the development of this software.

Copyright 2007 by the Regents of the University of Minnesota.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
