DBIx::Array::Export - Extends DBIx::Array with convenient export functions
use DBIx::Array::Export; my $dbx=DBIx::Array::Export->new; $dbx->connect($connection, $user, $pass, \%opt); #passed to DBI
Returns XML given an arrayhashname data structure
$dbx->execute(q{ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD"T"HH24:MI:SS"Z"'}); my @arrayhashname=$dbx->sqlarrayhashname($sql); my $xml=$dbx->xml_arrayhashname(data => \@arrayhashname, comment => "Text String Comment", uom => {col1=>"min", col2=>"ft"});
Returns CSV given an arrayarrayname data structure
my $csv=$dbx->csv_arrayarrayname($data);
Writes CSV to file handle given an executed cursor (with header row from $sth)
binmode($fh); $dbx->csv_cursor($fh, $sth);
Due to portability issues, I choose not to force the passed file handle into binmode. However, it IS required! For most file handle objects you can run binmode($fh) or $fh->binmode;
Appends CSV to file handle given an executed cursor (no header row)
binmode($fh); $dbx->csvappend_cursor($fh, $sth);
Returns XLS data blob given an arrayarrayname data structure
my $xls=$dbx->xls_arrayarrayname("Tab One"=>$data, "Tab Two"=>$data2, ...);
Switch out XML::Simple for XML::LibXML::LazyBuilder
Send email to author and log on RT.
DavisNetworks.com supports all Perl applications big or small.
Michael R. Davis CPAN ID: MRDVT STOP, LLC domain=>stopllc,tld=>com,account=>mdavis http://www.stopllc.com/
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
XML::Simple, Text::CSV_XS, Spreadsheet::WriteExcel::Simple::Tabs
Data::Table see csv and tsv methods, Data::Table::Excel
To install DBIx::Array, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Array
CPAN shell
perl -MCPAN -e shell install DBIx::Array
For more information on module installation, please visit the detailed CPAN module installation guide.