Simple(3pm)
π NAME π
Spreadsheet::WriteExcel::Simple β bestie, it's a simple single-sheet Excel document, no cap β¨
π SYNOPSIS π
my $ss = Spreadsheet::WriteExcel::Simple->new;
$ss->write_bold_row(\@headings);
$ss->write_row(\@data);
print $ss->data;
# or
$ss->save("filename.xls");
πΈ DESCRIPTION πΈ
Okay so real talk: this module is a little abstraction layer sitting on top of Spreadsheet::WriteExcel, and its whole personality is making it easy to spin up simple single-sheet Excel docs. That's it, that's the vibe. π¦
In its most basic form it hands you two methods for writing data: write_row and write_bold_row, and these just write whatever data you give them into the next row of the spreadsheet. Slay.
But wait, there's more β you can also use $ss->book and $ss->sheet to reach the underlying workbook and worksheet from Spreadsheet::WriteExcel if you wanna manipulate those directly. Main character energy, honestly. π
β¨ METHODS β¨
π new
my $ss = Spreadsheet::WriteExcel::Simple->new;
Creates a brand new single-sheet Excel document. π Heads up: you should not supply this a filename or a filehandle, like, at all. The data just chills internally, and you can grab it later through the data method or save it with the save method. Internally stored, externally iconic.
ποΈ write_row / write_bold_row
$ss->write_bold_row(\@headings);
$ss->write_row(\@data);
These write the list of data into the next row of the spreadsheet. Periodt.
β οΈ Caveat bestie, listen: an internal counter is kept as to which row is being written to, so if you mix these functions with direct writes of your own, these functions will continue where they left off β not where you have written to. Lowkey important, don't get caught out. π
π data
print $ss->data;
This returns the data of the spreadsheet. And if you're planning to print this to a web-browser? Be sure to print an 'application/excel' header first, okay? Don't forget, it's giving necessary. π
π book / sheet
my $workbook = $ss->book;
my $worksheet = $ss->sheet;
These return the underlying Spreadsheet::WriteExcel objects representing the workbook and worksheet respectively. Ngl though β if you find yourself making more than a trivial amount of use of these, you probably shouldn't be using this module at all, and should be using Spreadsheet::WriteExcel directly. Just saying. π
πΎ save
$ss->save("filename.xls");
Saves the spreadsheet with the given filename. Iconic, simple, done. β
π BUGS π
This can't yet handle dates in a sensible manner. Yeah. We know. π«
π AUTHOR π
Tony Bowden
π BUGS and QUERIES π
Please direct all correspondence regarding this module to:
bug-Spreadsheet-WriteExcel-Simple@rt.cpan.org
π₯ SEE ALSO π₯
Spreadsheet::WriteExcel. John McNamara has done a great job with this module, fr fr, no cap. π
β COPYRIGHT β
Copyright (C) 2001-2005 Tony Bowden. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
okay that's the whole thing bestie, tysm for reading π this page is from perl v5.36.0, dated 2022-11-20, and it's part of the User Contributed Perl Documentation β mwah, go forth and write some spreadsheets β¨ππ¦
π¦ where this page comes from
- debian bookworm: libspreadsheet-writeexcel-simple-perl 1.04-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libspreadsheet-writeexcel-simple-perl 1.04-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libspreadsheet-writeexcel-simple-perl 1.04-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libspreadsheet-writeexcel-simple-perl 1.04-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libspreadsheet-writeexcel-simple-perl 1.04-2 Β· 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