Provided by: libcatmandu-xls-perl_0.10-1_all
NAME
Catmandu::Importer::XLSX - Package that imports XLSX files
SYNOPSIS
# On the command line $ catmandu convert XLSX < ./t/test.xlsx $ catmandu convert XLSX --header 0 < ./t/test.xlsx $ catmandu convert XLSX --fields 1,2,3 < ./t/test.xlsx $ catmandu convert XLSX --columns 1 < ./t/test.xlsx $ catmandu convert XLSX --worksheet 1 < ./t/test.xlsx # Or in Perl use Catmandu::Importer::XLSX; my $importer = Catmandu::Importer::XLSX->new(file => "./t/test.xlsx"); my $n = $importer->each(sub { my $hashref = $_[0]; # ... });
DESCRIPTION
Catmandu importer for XLSX files.
METHODS
This module inherits all methods of Catmandu::Importer and by this Catmandu::Iterable.
CONFIGURATION
In addition to the configuration provided by Catmandu::Importer ("file", "fh", etc.) the importer can be configured with the following parameters: header 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. fields Provide custom object field names as array, hash reference or comma- separated list. columns When the 'columns' option is provided, then the object fields are named as column coordinates (A,B,C,...). Default: 0. empty How to treat empty fields in the data. When the option value is 'string', the empty values will be empty strings. When the option value is 'nil', the empty values will get turned into undefined fields. When the option is 'ignore', the empty values are ignored. Default is 'string'. worksheet If the Excel workbook contains more than one worksheet, you can select a specific worksheet by its index number (0,1,2,...). Default: 0.
SEE ALSO
Catmandu::Importer, Catmandu::Iterable, Catmandu::Importer::CSV, Catmandu::Importer::XLS.