Spreadsheet::WriteExcel::Simple::Tabs - Simple Interface to the Spreadsheet::WriteExcel Package
use Spreadsheet::WriteExcel::Simple::Tabs; my $ss=Spreadsheet::WriteExcel::Simple::Tabs->new; my @data=( ["Heading1", "Heading2"], ["data1", "data2" ], ["data3", "data4" ], ); $ss->add(Tab1=>\@data, Tab2=>\@data); print $ss->header(filename=>"filename.xls"), $ss->content;
This is a simple wrapper around Spreadsheet::WriteExcel that creates tabs for data. It is ment to be simple not full featured. I use this package to export data from the DBIx::Array sqlarrayarrayname method which is an array of array references where the first array is the column headings.
Returns the workbook object
$ss->add("Tab Name", \@data); $ss->add(Tab1=>\@data, Tab2=>\@data);
Returns a header appropriate for a web application
Content-type: application/vnd.ms-excel Content-Disposition: attachment; filename=filename.xls $ss->header #embedded in browser $ss->header(filename=>"filename.xls") #download prompt $ss->header(content_type=>"application/vnd.ms-excel") #default content type
This returns the binary content of the spreadsheet.
print $ss->content; print $ss->header, $ss->content; #CGI Application binmod($fh); print $fh, $ss->content;
Returns a hash of additional settings for the first row
$ss->first({setting=>"value"}); #settings from L<Spreadsheet::WriteExcel>
Returns a hash of default settings for the body
$ss->default({setting=>"value"}); #settings from L<Spreadsheet::WriteExcel>
Log on RT and contact the author.
DavisNetworks.com provides support services for all Perl applications including this package.
Michael R. Davis CPAN ID: MRDVT STOP, LLC domain=>michaelrdavis,tld=>com,account=>perl http://www.stopllc.com/
Copyright (c) 2009 Michael R. Davis Copyright (c) 2001-2005 Tony Bowden (IO::Scalar portion used here "under the same terms as Perl itself")
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.
Spreadsheet::WriteExcel::Simple, DBIx::Array sqlarrayarrayname method, IO::Scalar, Spreadsheet::WriteExcel
To install Spreadsheet::WriteExcel::Simple::Tabs, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Spreadsheet::WriteExcel::Simple::Tabs
CPAN shell
perl -MCPAN -e shell install Spreadsheet::WriteExcel::Simple::Tabs
For more information on module installation, please visit the detailed CPAN module installation guide.