Catmandu::Importer::XLS - Package that imports XLS files
# On the command line $ catmandu convert XLS < ./t/test.xls $ catmandu convert XLS --header 0 < ./t/test.xls $ catmandu convert XLS --fields 1,2,3 < ./t/test.xls $ catmandu convert XLS --columns 1 < ./t/test.xls # Or in Perl use Catmandu::Importer::XLS; my $importer = Catmandu::Importer::XLS->new(file => "./t/test.xls"); my $n = $importer->each(sub { my $hashref = $_[0]; # ... });
Catmandu importer for XLS files.
Only the first worksheet from the Excel workbook is imported.
This module inherits all methods of Catmandu::Importer and by this Catmandu::Iterable.
In addition to the configuration provided by Catmandu::Importer (file, fh, etc.) the importer can be configured with the following parameters:
file
fh
By default object fields are read from the XLS header line. If no header line is avaiable object fields are named as column coordinates (A,B,C,...). Default: 1.
Provide custom object field names as array, hash reference or comma- separated list.
When the 'columns' option is provided, then the object fields are named as column coordinates (A,B,C,...). Default: 0.
Catmandu::Importer, Catmandu::Iterable, Catmandu::Importer::CSV, Catmandu::Importer::XLSX.
To install Catmandu::XLS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu::XLS
CPAN shell
perl -MCPAN -e shell install Catmandu::XLS
For more information on module installation, please visit the detailed CPAN module installation guide.