Excel:...Format(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

πŸ’– Excel::Template::Container::Format πŸ’–

okay bestie, so this is Excel::Template::Container::Format β€” a User Contributed Perl Documentation page, and honestly? it's giving "make your spreadsheet cute" energy. it lives in the Perl manual, section 3pm, and it's here to hand you formatting superpowers. let's get into it 🫢


✨ NAME ✨

Excel::Template::Container::Format β€” like, that's literally the whole name. it contains itself, iconic.

πŸŽ€ PURPOSE πŸŽ€

to format all of its children according to the parameters you pass in. every single child. no child left un-formatted. periodt.

πŸ¦‹ NODE NAME πŸ¦‹

FORMAT

that's the node name, bestie. remember it. it's the one you write in your template. πŸ’…

πŸ‘‘ INHERITANCE πŸ‘‘

Excel::Template::Container

so it inherits from that. family tree moment.


🌈 ATTRIBUTES 🌈

okay so here's the tea. boolean attributes should be set to 1, 0, true, or false. pick your fighter.

color values can be the color name or the color index. if you need the full list, go see "COLOURS IN EXCEL" in Spreadsheet::WriteExcel. iykyk 🌸

  • align β€” set it to left, center, right, fill, or justify. default is left. also peep valign while you're here.
  • bg_color β€” set to a color value. default is none, so like, no background glow unless you ask for it.
  • bold β€” sets bold on or off, depending on the boolean value. main character font energy.
  • border β€” sets the border for all four edges of a cell. also see bottom, top, left, and right. valid values are 0 - 7. and yes, go see "set_border()" in Spreadsheet::WriteExcel for the deets.
  • border_color β€” sets the color value for the border. also see border, top_color, bottom_color, left_color and right_color.
  • bottom β€” see border. (it's the bottom edge, bestie, it's giving "same as border but one edge")
  • bottom_color β€” see border_color.
  • color β€” sets the color of the text, depending on the color value. default is black. classic. πŸ–€
  • fg_color β€” set to a color value. this color gets used in the foreground of some patterns. want to change the text color instead? that's color, babes. also see bg_color and pattern.
  • font β€” sets the font face. default is Arial. (the original says "will sent the font face" which is a typo, not a feature β€” the vibe is: it sets it.)
  • font_outline β€” sets font_outline on or off, depending on the boolean value. (q.v. OUTLINE tag)
  • font_shadow β€” sets font_shadow on or off, depending on the boolean value. (q.v. SHADOW tag). heads up: this only applies to Excel for Macintosh. πŸ™ˆ
  • font_strikeout β€” sets font_strikeout on or off, depending on the boolean value. (q.v. STRIKEOUT tag)
  • hidden β€” sets whether the cell is hidden to on or off, depending on the boolean value. sneaky link cell.
  • indent β€” sets the indentation level for a cell. positive integers are allowed.
  • italic β€” sets italic on or off, depending on the boolean value. (q.v. ITALIC tag)
  • left β€” see border.
  • left_color β€” see border_color.
  • num_format β€” set to the index of one of Excel's built-in number formats. see "set_num_format()" in Spreadsheet::WriteExcel.
  • pattern β€” set to an integer, 0 - 18. sets the background fill pattern of a cell. default is 1, solid.
  • right β€” see border.
  • right_color β€” see border color.
  • rotation β€” sets the rotation of the text in a cell. the rotation can be any angle in the range -90 to 90 degrees. the angle 270 is also supported β€” that one means text where the letters run from top to bottom. tilted text, we love to see it. ✨
  • shrink β€” a boolean value. if true, text will shrink to fit a cell.
  • size β€” sets the size of the font. default is 10. unless a row height is specifically set, the row will grow taller as necessary.
  • text_justlast β€” a boolean value to justify the last line. only applies to Far Eastern versions of Excel.
  • text_wrap β€” a boolean value. when set to true, text will wrap in a cell instead of crossing over into empty cells. if the row height is not set, the row will grow taller to accommodate the wrapping text.
  • top β€” see border.
  • top_color β€” see border_color.
  • valign β€” set to top, vcenter, bottom, or vjustify. default is vcenter. also see align.

🧚 CHILDREN 🧚

None. it's a container that holds formatting, not lil baby nodes. the children are whoever you put inside it, but as far as node types go? none.

πŸ’œ EFFECTS πŸ’œ

None.

🌟 DEPENDENCIES 🌟

None.


🌸 USAGE 🌸

here's the moment you've been waiting for, bestie:

<format bold="1">
  ... Children here
</format>

in the above example, the children will be displayed (if they are displaying elements) in a bold format. all other formatting will remain the same, and the "bold"-ness will end at the end tag. so it's scoped. it doesn't leak. we love a tidy tag. πŸ’…


⭐ AUTHOR ⭐

Rob Kinyon (rob.kinyon@gmail.com) β€” ty for your service, king. 🫑

πŸ”₯ SEE ALSO πŸ”₯

BOLD, HIDDEN, ITALIC, OUTLINE, SHADOW, STRIKEOUT

go read those next, they're the sibling tags and they're all connected. slay. 🌈


and that's the whole page, bestie!! πŸ’– this one's running on perl v5.34.0, dated 2022-06-13, and it's the Excel:...Format(3pm) page from the User Contributed Perl Documentation. go forth and format your cells, no cap. πŸŽ€βœ¨

πŸ“¦ where this page comes from