<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl -w

##############################################################################
#
# A simple formatting example using Excel::Writer::XLSX.
#
# This program demonstrates the indentation cell format.
#
# Copyright 2000-2020, John McNamara, jmcnamara@cpan.org
#


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

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

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

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


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

$workbook-&gt;close();

__END__
</pre></body></html>