1 package Excel::Template::Element::Image;
7 @ISA = qw(Excel::Template::Element);
9 use Excel::Template::Element;
16 my $path = $context->get( $self, 'PATH' );
17 my ($row, $col, $offset, $scale) = map {
18 $context->get($self, $_)
19 } qw( ROW COL OFFSET SCALE );
22 if ( $offset =~ /^\s*([\d.]+)\s*,\s*([\d.]+)/ ) {
27 if ( $scale =~ /^\s*([\d.]+)\s*,\s*([\d.]+)/ ) {
31 $context->active_worksheet->insert_image(
32 $row, $col, $path, @offsets, @scales,
49 Excel::Template::Element::Image - Excel::Template::Element::Image
53 To insert an image into the worksheet
61 L<ELEMENT|Excel::Template::Element>
69 <image path="/Some/Full/Path" />
70 <image path="/Some/Full/Path" offset="2,5" />
71 <image path="/Some/Full/Path" scale="2,0.4" />
72 <image path="/Some/Full/Path" offset="4,0" scale="0,2" />
74 Please see L<Spreadsheet::WriteExcel/> for more information about the offset and scaling options as well as any other restrictions that might be in place. This node does B<NOT> perform any sort of validation upon your parameters. You are assumed to know what you are doing.
78 Rob Kinyon (rob.kinyon@gmail.com)