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