Excel:...::Cell(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::Element::Cell β€” the whole vibe

okay bestie, gather round, because this is Excel::Template::Element::Cell and it's literally the element that makes your spreadsheet not empty. It's part of the Perl docs (User Contributed Perl Documentation), and it's here to spill the tea on writing actual content into cells. πŸŽ€


✨ PURPOSE ✨

To actually write stuff to the worksheet. That's it. That's the job. It puts the words in the little boxes. πŸ’…


πŸ¦‹ NODE NAME πŸ¦‹

CELL

That's what you call it in your template, no cap.


πŸ‘‘ INHERITANCE πŸ‘‘

ELEMENT

It inherits from ELEMENT, so it's got that family money. πŸ’œ


🌸 ATTRIBUTES 🌸

  • TEXT β€” the actual text you're writing into the cell, bestie. It can be plain text, or it can be a parameter with a dollar-sign in front of the parameter name.
  • COL β€” optionally you can say which column you want this cell to live in. It can be a number (zero-based, so don't come at me with "why is the first column 0") or an offset. Peep Excel::Template for the whole offset-based numbering situation. 🧚
  • REF β€” this adds the current cell to a list of cells that can be backreferenced. Super useful when the current cell needs to be referenced by a formula. Go look at BACKREF and RANGE. ✨
  • WIDTH β€” sets the width of the column the cell is in. If you set it multiple times for the same column, the last setting wins. periodt.
  • TYPE β€” this lets you pick which write_*() method gets used. By default it calls write() and lets Spreadsheet::WriteExcel make the right call. But maybe you wanna override it, main character behaviour. Heads up though: Excel::Template will not do any form of validation on what you provide. You are assumed to know what you're doing. πŸ™ˆ

The legal types (taken from Spreadsheet::WriteExcel) are:

  • COMMENT β€” add a comment to the cell
  • blank
  • formula
  • number
  • string
  • url
  • date_time

other write_* methods as defined defined Spreadsheet::WriteExcel would be integrated by request. (yes, "defined defined" β€” I'm not fixing it, I'm not a snitch. πŸ’€)


🫢 CHILDREN 🫢

FORMULA


🌈 EFFECTS 🌈

This will consume one column in the current row. One cell, one column, no sharing. 😌


⭐ DEPENDENCIES ⭐

None


πŸ’… USAGE πŸ’…

<cell text="Some Text Here"/>
<cell>Some other text here</cell>

<cell text="$Param2"/>
<cell>Some <var name="Param"> text here</cell>

In the above example, four cells are written out. The first two have text hard-coded. The second two have variables. The third and fourth items have another thing that should be noted. If you have text where you want a variable in the middle, you have to use the latter form. Variables within parameters are the entire parameter's value. iykyk

Please see Spreadsheet::WriteExcel for what constitutes a legal formula. Don't freestyle it, bestie, there are rules. πŸ“


πŸŽ€ AUTHOR πŸŽ€

Rob Kinyon (rob.kinyon@gmail.com)


πŸ”₯ SEE ALSO πŸ”₯

ROW, VAR, FORMULA


lowkey iconic, highkey useful. go write some cells. πŸ¦‹

This page came to you via perl v5.34.0, dated 2022-06-13. mwah, bye bestie! πŸ’–βœ¨

πŸ“¦ where this page comes from