1 package Excel::Template::Container::Format;
7 @ISA = qw( Excel::Template::Container );
9 use Excel::Template::Container;
12 use Excel::Template::Format;
19 my $old_format = $context->active_format;
22 while ( my ($k, $v) = each %$self ) {
23 $values{$k} = $context->resolve( $self, $k );
26 my $format = $context->format_object->copy(
27 $context, $old_format, %values,
29 $context->active_format($format);
31 my $child_success = $self->iterate_over_children($context);
33 $context->active_format($old_format);
35 return $child_success;
43 Excel::Template::Container::Format - Excel::Template::Container::Format
47 To format all children according to the parameters
55 Excel::Template::Container
59 Boolean attributes should be set to 1, 0, true, or false.
61 Color values can be the color name or the color index. See L<Spreadsheet::WriteExcel/"COLOURS IN EXCEL">
67 Set to either left, center, right, fill, or justify. Default is left. See also valign.
71 Set to a color value. Default is none.
75 This will set bold to on or off, depending on the boolean value.
79 Set the border for all for edges of a cell. Also see bottom, top, left, and right.
80 Valid values are 0 - 7.
82 See L<Spreadsheet::WriteExcel/"set_border()">
86 Sets the color value for the border. See also border, top_color, bottom_color, left_color
99 This will set the color of the text, depending on color value. Default is black.
103 Set to a color value. This color will be used in foreground of some patterns. See color
104 to change the color of text. Also see bg_color and pattern.
108 This will sent the font face. Default is Arial.
112 This will set font_outline to on or off, depending on the boolean value. (q.v.
117 This will set font_shadow to on or off, depending on the boolean value. (q.v.
118 SHADOW tag). This only applies to Excel for Macintosh.
120 =item * font_strikeout
122 This will set font_strikeout to on or off, depending on the boolean value. (q.v.
127 This will set whether the cell is hidden to on or off, depending on the boolean
132 Set the indentation level for a cell. Positive integers are allowed.
136 This will set italic to on or off, depending on the boolean value. (q.v. ITALIC
149 Set to the index of one of Excel's built-in number formats. See L<Spreadsheet::WriteExcel/"set_num_format()">
153 Set to an integer, 0 - 18. Sets the background fill pattern of a ell. Default is 1, solid.
165 Set the rotation of the text in a cell. The rotation can be any angle in the range -90 to 90 degrees.
166 The angle 270 is also supported. This indicates text where the letters run from top to bottom.
170 A boolean value. If true, text will shrink to fit a cell.
174 This will set the size of the font. Default is 10. Unless a row height is
175 specifically set, the row will grow taller as necessary.
177 =item * text_justlast
179 A boolean value to justify the last line. Only applies to Far Eastern versions of Excel.
183 A boolean value. When set to true, text will wrap in a cell instead of crossing over
184 into empty cells. If the row height is not set, the row will grow taller to accommodate
197 Set to top, vcenter, bottom, or vjustify. Default is vcenter. See also align.
219 In the above example, the children will be displayed (if they are displaying
220 elements) in a bold format. All other formatting will remain the same and the
221 "bold"-ness will end at the end tag.
225 Rob Kinyon (rob.kinyon@gmail.com)
229 BOLD, HIDDEN, ITALIC, OUTLINE, SHADOW, STRIKEOUT