Excel:...rksheet(3pm)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.34 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Excel::Template::Container::Worksheet β€” like, it's the whole package, and also it's literally just Excel::Template::Container::Worksheet. That's the name, bestie. Same thing twice, iconic behavior honestly.


✨ PURPOSE ✨

To provide a new worksheet. That's it. That's the job. It makes you a fresh sheet and it does it slayfully. πŸŽ€


πŸ¦‹ NODE NAME πŸ¦‹

WORKSHEET

That's what you call it in your XML. Write it down, you'll need it. πŸ’…


🌸 INHERITANCE 🌸

Excel::Template::Container

Yeah, it inherited from that one. Family tree moment. It's giving nepo baby but make it Perl. πŸ‘‘


⭐ ATTRIBUTES ⭐

Okay so here's where it gets juicy. Every single one of these, no skips:

  • NAME β€” this is the name of the worksheet to be added. Give your sheet a name, it deserves one. 🫢
  • PROTECT β€” if the attribute exists, it will mark the worksheet as being protected. Whatever value is set will be used as the password. And heads up: this activates the HIDDEN and LOCKED nodes. So like, the whole sheet is in its locked-girl era. πŸ”’
  • KEEP_LEADING_ZEROS β€” this will change the behavior of the worksheet to preserve leading zeros. Because 007 should stay 007 and not turn into a sad little 7, fr fr.
  • HIDE_GRIDLINE β€” this method is used to hide the gridlines on the screen and printed page. Gridlines are the lines that divide the cells on a worksheet. Screen and printed gridlines are turned on by default in an Excel worksheet. If you have defined your own cell borders you may wish to hide the default gridlines.
$worksheet->hide_gridlines();

The following values of $option are valid:

0 : Don't hide gridlines
1 : Hide printed gridlines only
2 : Hide screen and printed gridlines

If you don't supply an argument or use undef the default option is 1, i.e. only the printed gridlines are hidden. Not me defaulting to the half-hide, the printed-only erasure, the selective invisibility. πŸ’€

  • LANDSCAPE β€” this will set the worksheet's orientation to landscape. Wide. Horizontal. Main character energy. 🌈
  • PORTRAIT β€” this will set the worksheet's orientation to portrait. While this is the default, it's useful to override the default at times. For example, in the following situation:
<workbook landscape="1">
  <worksheet>
    ...
  </worksheet
  <worksheet portrait="1">
    ...
  </worksheet
  <worksheet>
    ...
  </worksheet
</workbook>

In that example, the first and third worksheets will be landscape (inheriting it from the workbook node), but the second worksheet will be portrait. See?? The middle child said "not today" and did its own thing. That's the override. πŸŽ€

  • AUTOFILTER β€” with these attribute, you can add the autofilter to a worksheet. An autofilter is a way of adding drop down lists to the headers of a 2D range of worksheet data. This is turn allow users to filter the data based on simple criteria so that some data is shown and some is hidden. Dropdowns in your headers? Filtering your data with simple criteria? Obsessed, actually.

Example to add an autofilter to a worksheet:

<workbook>
  <worksheet autofilter='A1:D11' />
  <worksheet autofilter='0, 0, 10, 3' />
</workbook>

🧚 CHILDREN 🧚

None. Empty. No children here, this container is living its solo era. πŸ’œ


πŸ’œ EFFECTS πŸ’œ

None. Zero effects. It simply exists and looks pretty. πŸ’…


πŸ“ DEPENDENCIES πŸ“

None. It's self-sufficient. It doesn't need anybody. Growth. 🌱


πŸ”₯ USAGE πŸ”₯

<worksheet name="My Taxes">
  ... Children here
</worksheet>

In the above example, the children will be executed in the context of the "My Taxes" worksheet. So everything you put inside is living in the My Taxes world. It's giving nested reality. 😭


πŸ‘‘ AUTHOR πŸ‘‘

Rob Kinyon (rob.kinyon@gmail.com)

Thank you Rob, you ate. 🫢


🌈 SEE ALSO 🌈

ROW, CELL, FORMULA

Go read those next, bestie, they're all in the same little family. ✨


And that's the whole page, no cap β€” this was perl v5.34.0, dated 2022-06-13, and it's the Excel:...rksheet(3pm) page, which is a very mysterious truncated-looking title and honestly? Kind of a vibe. Byeeee πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from