Catman...er::XLS(3pm)

πŸ“¦
version 0.11 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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 to 1 and you get it β€” and 1 is 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 the fields option). 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::CSV
  • Catmandu::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