| Excel-Template documentation | Contained in the Excel-Template distribution. |
Excel::Template::Container::Row - Excel::Template::Container::Row
To provide a row context for CELL tags
ROW
Excel::Template::Container
Sets the height of the row. The last setting for a given row will win out.
None
Each ROW tag will consume one row of the workbook. When the ROW tag starts, it will set the COL value to 0.
None
<row>
... Children here
</row>
Generally, you will have CELL and/or FORMULA tags within a ROW.
Rob Kinyon (rob.kinyon@gmail.com)
CELL, FORMULA
| Excel-Template documentation | Contained in the Excel-Template distribution. |
package Excel::Template::Container::Row; use strict; BEGIN { use vars qw(@ISA); @ISA = qw(Excel::Template::Container); use Excel::Template::Container; } sub render { my $self = shift; my ($context) = @_; $context->{COL} = 0; # Apply the height to the current row if (my $height = $context->get($self, 'HEIGHT')) { $height =~ s/\D//g; $height *= 1; if ($height > 0) { $context->active_worksheet->set_row( $context->get( $self, 'ROW' ), $height, ); } } return $self->SUPER::render($context); } sub deltas { return { ROW => +1, }; } 1; __END__