Excel:...Format(3pm)
π 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 toleft,center,right,fill, orjustify. default isleft. also peepvalignwhile 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 seebottom,top,left, andright. valid values are0-7. and yes, go see"set_border()"inSpreadsheet::WriteExcelfor the deets.border_colorβ sets the color value for the border. also seeborder,top_color,bottom_color,left_colorandright_color.bottomβ seeborder. (it's the bottom edge, bestie, it's giving "same as border but one edge")bottom_colorβ seeborder_color.colorβ sets the color of the text, depending on the color value. default isblack. 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'scolor, babes. also seebg_colorandpattern.fontβ sets the font face. default isArial. (the original says "will sent the font face" which is a typo, not a feature β the vibe is: it sets it.)font_outlineβ setsfont_outlineon or off, depending on the boolean value. (q.v.OUTLINEtag)font_shadowβ setsfont_shadowon or off, depending on the boolean value. (q.v.SHADOWtag). heads up: this only applies to Excel for Macintosh. πfont_strikeoutβ setsfont_strikeouton or off, depending on the boolean value. (q.v.STRIKEOUTtag)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.ITALICtag)leftβ seeborder.left_colorβ seeborder_color.num_formatβ set to the index of one of Excel's built-in number formats. see"set_num_format()"inSpreadsheet::WriteExcel.patternβ set to an integer,0-18. sets the background fill pattern of a cell. default is1,solid.rightβ seeborder.right_colorβ see border color.rotationβ sets the rotation of the text in a cell. the rotation can be any angle in the range-90to90degrees. the angle270is 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 is10. 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β seeborder.top_colorβ seeborder_color.valignβ set totop,vcenter,bottom, orvjustify. default isvcenter. also seealign.
π§ 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
- debian bookworm: libexcel-template-perl 0.34-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libexcel-template-perl 0.34-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libexcel-template-perl 0.34-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libexcel-template-perl 0.34-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libexcel-template-perl 0.34-3 Β· 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