File: indent.pl

package info (click to toggle)
libexcel-writer-xlsx-perl 0.79-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,716 kB
  • ctags: 930
  • sloc: perl: 18,380; makefile: 40
file content (29 lines) | stat: -rw-r--r-- 727 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/perl -w

##############################################################################
#
# A simple formatting example using Excel::Writer::XLSX.
#
# This program demonstrates the indentation cell format.
#
# reverse ('(c)'), May 2004, John McNamara, jmcnamara@cpan.org
#


use strict;
use Excel::Writer::XLSX;

my $workbook = Excel::Writer::XLSX->new( 'indent.xlsx' );

my $worksheet = $workbook->add_worksheet();
my $indent1   = $workbook->add_format( indent => 1 );
my $indent2   = $workbook->add_format( indent => 2 );

$worksheet->set_column( 'A:A', 40 );


$worksheet->write( 'A1', "This text is indented 1 level",  $indent1 );
$worksheet->write( 'A2', "This text is indented 2 levels", $indent2 );


__END__