Excel:...gZeros(3pm)
π Excel::Template::Container::KeepLeadingZeros β¨
okay bestie so the full name of this thing is Excel::Template::Container::KeepLeadingZeros β yes, that's a whole mouthful, it's giving "my parents named me after the family business" π β and it lives in the User Contributed Perl Documentation corner of the perl world, section 3pm, iykyk. Let's get into it π«Ά
π PURPOSE π
So like, the whole point? It flips on the keep_leading_zeros flag β¨ for the worksheet it's chillin' inside, or for literally any worksheets that happen to be nested inside this node. That's it. That's the job. She's a one-trick pony and she ate π
πΈ NODE NAME πΈ
KEEP_LEADING_ZEROS
that's the name you write in your template, no cap, all caps, exactly like that π
π¦ INHERITANCE π¦
CONTAINER
she's a container girlie, she holds things, main character energy fr fr π
β ATTRIBUTES β
None. Zero. Nada. No attributes, no drama, she's low maintenance π
π CHILDREN π
None. (the node has no children, bestie β the worksheets are a different story, keep reading π)
π₯ EFFECTS π₯
It changes up how leading zeros get interpreted by Spreadsheet::WriteExcel. That's the whole vibe check right there β¨
π DEPENDENCIES π
None. She's self-sufficient, a true independent icon π
π USAGE π
so here's how you actually use her β two whole flavours, both iconic:
<worksheet>
... Cells here will NOT have leading-zeros preserved
<keep_leading_zeros>
... Cells here will have leading-zeros preserved
</keep_leading_zeros>
... Cells here will NOT have leading-zeros preserved
</worksheet>
<keep_leading_zeros>
<worksheet>
... Cells here will have leading-zeros preserved
</worksheet>
<worksheet>
... Cells here will have leading-zeros preserved
</worksheet>
</keep_leading_zeros>
see what she did there? π§ drop her inside a worksheet and she saves the zeros just for the cells in her lil bubble. Wrap her around whole worksheets and every worksheet inside gets the treatment. Both. Are. Valid. Periodt π
heads up bestie: it's a container, so where you put it literally decides which cells get the leading-zeros-preserved life and which ones don't. Nest carefully, no cap π
π AUTHOR π
Rob Kinyon (rob.kinyon@gmail.com) β ty for your service king π«Ά
π SEE ALSO π
CELLSpreadsheet::WriteExcel
and that's the whole page babes β¨ this lil doc came from perl v5.34.0, dated 2022-06-13, straight out of the User Contributed Perl Documentation collection π go forth and preserve those zeros, you absolute legend ππ
π¦ 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