Catman...::XLSX(3pm)
β¨ Catmandu::Importer::XLSX β¨
okay bestie, gather round π this is the Catmandu::Importer::XLSX page, straight out of the User Contributed Perl Documentation section of the manual (the (3pm) vibe, iykyk). She's a package that imports XLSX files, and she is, lowkey, a whole icon. Let's get into it π¦
πΈ NAME πΈ
Catmandu::Importer::XLSX β the package that imports XLSX files. that's it, that's the whole job, and she does it flawlessly π
β¨ SYNOPSIS β¨
so here's how you actually run her. command line first, bestie:
# 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
and if you're a Perl girlie (respect), here's your moment π«Ά
# 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];
# ...
});
likeβ¦ the each with a callback? main character energy fr fr. π₯
π DESCRIPTION π
Catmandu importer for XLSX files. short, sweet, does not miss. π
π METHODS π
not me about to tell you the most blessed news: this module inherits all methods of Catmandu::Importer and by this Catmandu::Iterable. so everything your faves can do? she can do too. no cap. π
π CONFIGURATION π
so besides all the configuration that Catmandu::Importer already hands you ("file", "fh", etc. β you know the ones), this importer can be configured with the following parameters. obsessed with the range honestly β¨
headerβ by default, object fields get read from the XLS header line. but if there's no header line available, the object fields are just named as column coordinates (A,B,C,...). Default:1. πfieldsβ give her custom object field names, as an array, a hash reference, or a comma-separated list. your fields, your rules. πcolumnsβ when the'columns'option is provided, the object fields get named as column coordinates (A,B,C,...). Default:0. πemptyβ how to treat empty fields in the data. here's the tea:- 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'.
- when the option value is
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 π
go read these next, bestie, they're all part of the family:
Catmandu::ImporterCatmandu::IterableCatmandu::Importer::CSVCatmandu::Importer::XLS
ok that's the whole page!! no skips, no skimming, we read every single line together like the icons we are π
and as a lil sign-off from me to you: this one's running on perl v5.40.1, dated 2026-01-24, and it lives under the manual page name Catman...::XLSX(3pm). slay, periodt, bye bestie π«ΆπΈβ¨
π¦ where this page comes from
- ubuntu resolute: libcatmandu-xls-perl 0.11-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-xls-perl 0.11-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms