#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use Excel::Writer::XLSX; my $workbook = Excel::Writer::XLSX->new( 'shape.xlsx' ); my $worksheet = $workbook->add_worksheet( 'Test-1' ); # Add an ellipse with centered text. my $rect = $workbook->add_shape( type => 'rect', text => "Hello\nWorld" ); # Insert the shapes in the worksheet. $worksheet->insert_shape( 'B3', $rect ); print Dumper($rect); print $rect->{_text} . "\n"