Spread...arseODS(3pm)
π Spreadsheet::ParseODS β the manual, but make it cute
okay bestie, gather round π«Ά this is the perl manpage for Spreadsheet::ParseODS (that's section 3pm of the perl docs, iykyk), and it does exactly one iconic thing: it reads SXC and ODS files. That's the whole vibe. Spreadsheets. Opened. Slayed. π
β¨ NAME β¨
Spreadsheet::ParseODS β literally just here to read SXC and ODS files. no cap. π
πΈ SYNOPSIS πΈ
the three-line main character entrance:
my $parser = Spreadsheet::ParseODS->new(
line_separator => "\n", # for multiline values
);
my $workbook = $parser->parse("$d/$file");
my $sheet = $workbook->worksheet('Sheet1');
look at her go π¦ make a parser, parse a file, grab a sheet. that's it. that's the whole relationship.
π WARNING π
bestie. listen. This module is not yet API-compatible withSpreadsheet::ParseXLSXandSpreadsheet::ParseXLS. π¨
Method-level compatibility is planned (they're working on it, we love growth π), but there will always be differences in the values returned β for example, in the cell types. so like. don't just swap it in and expect zero drama. the cell types are giving "surprise". π
π METHODS π
π ->new
the constructor, the moment of creation, the birth of a parser β¨
Options
line_separatorβ the value used to separate multi-line cell values. that's it, that's the job. πreadonlyβ creates the sheet as readonly, and sharesCellsbetween repeated rows. this uses less memory, at the cost of not being able to modify the data structure. so: cheap on RAM, but hands off the data, bestie. πNoTruncateβ a legacy option that says don't truncate the sheets by stripping empty columns off the right edge of a sheet. heads up: this option will likely be renamed or moved, so don't get too attached. πtwigβ a premadeXML::Twig::XPathinstance. bring your own, queen. π
π§ ->parse( %options )
my $workbook = Spreadsheet::ParseODS->new()->parse( 'example.ods' );
reads the spreadsheet into memory and returns the data as a Spreadsheet::ParseODS::Workbook object. yes, in memory. yes, all of it. π
Options
inputtypeβ the type of file, used when you're passing a filehandle. can be"ods","sxc","fods"or"xml". β¨
also, this method takes the same options as the constructor, so everything from ->new works here too. no need to re-learn anything, we love consistency. π
π REPOSITORY π
the public repository of this module lives at <https://github.com/Corion/Spreadsheet-ReadSXC>. go star it, it's free and it's cute. β
π«Ά SUPPORT π«Ά
the public support forum of this module is <https://perlmonks.org/>. the monks are lovely, they will help you. π
π BUG TRACKER π
please report bugs in this module via the Github bug queue at <https://github.com/Corion/Spreadsheet-ReadSXC/issues>. found a bug? tell on it, respectfully. π
π AUTHOR π
Max Maischein corion@cpan.org β the icon, the legend, the one who wrote all this. π
π CONTRIBUTORS π
H. Merijn Brand hmbrand@cpan.org and Mohammad S Anwar manwar@cpan.org. the supporting cast, and they ate. β¨
π COPYRIGHT (c) π
Copyright 2019-2024 by Max Maischein corion@cpan.org.
π LICENSE π
This module is released under the same terms as Perl itself. so, same energy as perl, which is honestly a serve. πΈ
and that's the whole page, bestie!! π this was perl v5.40.0, dated 2024-08-17, from the Spread...arseODS(3pm) era β go forth and parse some spreadsheets. periodt. πβ¨π¦
π¦ where this page comes from
- ubuntu resolute: libspreadsheet-readsxc-perl 0.39-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libspreadsheet-readsxc-perl 0.39-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