~ubuntu-branches/ubuntu/jaunty/horae/jaunty

« back to all changes in this revision

Viewing changes to 0CPAN/Spreadsheet-WriteExcel-2.15/examples/diag_border.pl

  • Committer: Bazaar Package Importer
  • Author(s): Carlo Segre
  • Date: 2008-02-23 23:13:02 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080223231302-mnyyxs3icvrus4ke
Tags: 066-3
Apply patch to athena_parts/misc.pl for compatibility with 
perl-tk 804.28.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/perl -w
2
 
 
3
 
##############################################################################
4
 
#
5
 
# A simple formatting example using Spreadsheet::WriteExcel.
6
 
#
7
 
# This program demonstrates the diagonal border cell format.
8
 
#
9
 
# reverse('�'), May 2004, John McNamara, jmcnamara@cpan.org
10
 
#
11
 
 
12
 
use strict;
13
 
use Spreadsheet::WriteExcel;
14
 
 
15
 
 
16
 
my $workbook  = Spreadsheet::WriteExcel->new('diag_border.xls');
17
 
my $worksheet = $workbook->add_worksheet();
18
 
 
19
 
 
20
 
my $format1   = $workbook->add_format(diag_type       => '1');
21
 
 
22
 
my $format2   = $workbook->add_format(diag_type       => '2');
23
 
 
24
 
my $format3   = $workbook->add_format(diag_type       => '3');
25
 
 
26
 
my $format4   = $workbook->add_format(
27
 
                                      diag_type       => '3',
28
 
                                      diag_border     => '7',
29
 
                                      diag_color      => 'red',
30
 
                                     );
31
 
 
32
 
 
33
 
$worksheet->write('B3',  'Text', $format1);
34
 
$worksheet->write('B6',  'Text', $format2);
35
 
$worksheet->write('B9',  'Text', $format3);
36
 
$worksheet->write('B12', 'Text', $format4);
37
 
 
38
 
 
39
 
 
40
 
__END__
41