#!/usr/bin/perl -w
###############################################################################
#
# This example demonstrates writing cell comments. A cell comment is indicated
# in Excel by a small red triangle in the upper right-hand corner of the cell.
#
# reverse('©'), April 2005, John McNamara, jmcnamara@cpan.org
#
use strict;
use Spreadsheet::WriteExcelXML;
my $workbook = Spreadsheet::WriteExcelXML->new("comments.xls");
my $worksheet = $workbook->add_worksheet();
$worksheet->write ('B2', 'Hello');
$worksheet->write_comment('B2', 'This is a comment.');
my $str = 'Some ' .
'bold' .
' and ' .
'italic' .
' text';
$worksheet->write ('B4', 'Formatted');
$worksheet->write_comment('B4', $str);