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 with Spreadsheet::ParseXLSX and Spreadsheet::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 shares Cells between 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 premade XML::Twig::XPath instance. 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 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