1 package Excel::Template::Element::Backref;
4 use Spreadsheet::WriteExcel::Utility;
8 @ISA = qw(Excel::Template::Element);
10 use Excel::Template::Element;
18 my $ref_name = $context->resolve($self, 'REF');
20 my ($row, $col) = $context->get_last_reference( $ref_name );
21 return '' unless defined $row && defined $col;
23 return xl_rowcol_to_cell( $row, $col );
31 Excel::Template::Element::Backref - Excel::Template::Element::Backref
35 Returns the cell location (i.e. B2) of the last cell to name this reference. To
36 return the location of the entire range of cells to name this reference see RANGE.
44 Excel::Template::Element
52 This is the name of the reference to look up.
66 This will only be used within CELL tags.
73 <cell ref="this_cell"/><cell ref="that_cell"><cell ref="that_cell">
76 <formula>=<backref ref="this_cell">+<backref ref="that_cell"></formula>
79 The formula in row 2 would be =A1+C1. C1 is the last to reference "that_cell".
83 Rob Kinyon (rkinyon@columbus.rr.com)