File: Formula.pm

package info (click to toggle)
libexcel-template-perl 0.34-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 608 kB
  • sloc: perl: 3,471; xml: 210; makefile: 2
file content (78 lines) | stat: -rw-r--r-- 1,429 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package Excel::Template::Element::Formula;

use strict;

BEGIN {
    use vars qw(@ISA);
    @ISA = qw(Excel::Template::Element::Cell);

    use Excel::Template::Element::Cell;
}

sub render { $_[0]->SUPER::render( $_[1], 'write_formula' ) }
#{
#    my $self = shift;
#    my ($context) = @_;
#
#    return $self->SUPER::render( $context, 'write_formula' );
#}

1;
__END__

=head1 NAME

Excel::Template::Element::Formula - Excel::Template::Element::Formula

=head1 PURPOSE

To write formulas to the worksheet

=head1 NODE NAME

FORMULA

=head1 INHERITANCE

Excel::Template::Element::Cell

=head1 ATTRIBUTES

All attributes a CELL can have, a FORMULA can have, including the ability to be
referenced using the 'ref' attribute.

=head1 CHILDREN

None

=head1 EFFECTS

This will consume one column on the current row. 

=head1 DEPENDENCIES

None

=head1 USAGE

  <formula text="=(1 + 2)"/>
  <formula>=SUM(A1:A5)</formula>

  <formula text="$Param2"/>
  <formula>=(A1 + <var name="Param">)</formula>

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

=head1 AUTHOR

Rob Kinyon (rob.kinyon@gmail.com)

=head1 SEE ALSO

CELL

=cut