Catman...er::XLS(3pm)
π Catmandu::Exporter::XLS β the 3pm girlies' manual π
okay bestie, so this is the manual page for Catmandu::Exporter::XLS, straight outta the User Contributed Perl Documentation corner of the 3pm section. It's the whole vibe: a Catmandu exporter that spits out Excel .xls files. Let's get into it π¦
β¨ NAME β¨
Catmandu::Exporter::XLS β the package that exports XLS files. that's it, that's the whole job π
πΈ SYNOPSIS πΈ
first up, the command-line era, she's serving:
# 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
and then the Perl main-character route, obsessed:
# 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;
literally the full arc: build it, add one, add_many a whole pile, commit, then count your wins. periodt π―
π DESCRIPTION π
It's a Catmandu exporter for Excel XLS files. that's the tea. no cap, that's the entire description and she ate π
π METHODS π
for the full list of methods, go look at these besties: Catmandu::Exporter, Catmandu::Addable, Catmandu::Fixable, Catmandu::Counter, and Catmandu::Logger. they've got the whole method menu, iykyk π
π CONFIGURATION π
so besides all the config that Catmandu::Exporter already hands you (file, fh, etc. β the usual suspects), the importer can also be configured with these parameters:
headerβ include a header line with the column names. set it to1and you get it β and1is the default, so it's already on unless you say otherwise πfieldsβ the list of fields to be used as columns. give it as an array reference or as a comma-separated string πcolumnsβ the list of custom column names. give it as an array reference or a comma-separated list π«collect_fieldsβ this one first reads the complete stream to build a complete list of fields to export. if you don't set this option, only the fields of the first record get exported (or the ones you provided in thefieldsoption). so like, if you want her to see every field, set it. if you're cool with just the first record's fields, don't π«Ά
π₯ SEE ALSO π₯
Catmandu::Exporter::CSVCatmandu::Exporter::XLSX
and that's the whole page, bestie!! this icon of a manual was brought to you by perl v5.40.1, dated 2026-01-24 β love that for us πβ¨ mwah, go export something gorgeous πΈπ¦π
π¦ 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