-
-
04 Jan 2021 10:57:06 UTC
- Distribution: Catmandu-XLS
- Module version: 0.10
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (1)
- Testers (146 / 0 / 2)
- Kwalitee
Bus factor: 5- % Coverage
- License: perl_5
- Perl: v5.10.1
- Activity
24 month- Tools
- Download (39.58KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 5 contributors- Nicolas Steenlant, C<< <nicolas.steenlant at ugent.be> >>
-
Johann Rolschewski
-
Mohammad S Anwar
-
Patrick Hochstenbach
-
vpeil
NAME
Catmandu::Exporter::XLS - Package that exports XLS files
SYNOPSIS
# On the command line $ printf "a,b,c\n1,2,3" | catmandu convert CSV to XLS --file test.xls $ printf "a,b,c\n1,2,3" | catmandu convert CSV to XLS --file test.xls --header 0 $ printf "a,b,c\n1,2,3" | catmandu convert CSV to XLS --file test.xls --fields a,c $ printf "a,b,c\n1,2,3" | catmandu convert CSV to XLS --file test.xls --fields a,c --columns ALPHA,CHARLIE # Or in Perl use Catmandu::Exporter::XLS; my $exporter = Catmandu::Exporter::XLS->new( file => 'test.xls', fields => 'a,b,c', columns => 'ALPHA,BRAVO,CHARLIE', header => 1); $exporter->add({a => 1, b => 2, c => 3}); $exporter->add_many($arrayref); $exporter->commit; printf "exported %d objects\n" , $exporter->count;
DESCRIPTION
Catmandu exporter for Excel XLS files.
METHODS
See Catmandu::Exporter, Catmandu::Addable, Catmandu::Fixable, Catmandu::Counter, and Catmandu::Logger for a full list of methods.
CONFIGURATION
In addition to the configuration provided by Catmandu::Exporter (
file
,fh
, etc.) the importer can be configured with the following parameters:- header
-
Include a header line with column names, if set to 1 (default).
- fields
-
List of fields to be used as columns, given as array reference or comma-separated string
- columns
-
List of custom column names, given as array reference or comma-separated list.
- collect_fields
-
This option will first read the complete stream to create a complete list of fields to export. When this option is not set, only the fields of the first record (or the ones provided in the
fields
option will be exported).
SEE ALSO
Module Install Instructions
To install Catmandu::XLS, copy and paste the appropriate command in to your terminal.
cpanm Catmandu::XLS
perl -MCPAN -e shell install Catmandu::XLS
For more information on module installation, please visit the detailed CPAN module installation guide.