There is a problem when iinserting several shapes linked together and an image.
When the connectors are inserted in the same worksheet that an image, they are no longer connected to their respective shapes.
To link the shapes, I used the example of documentation shape5.pl.
http://cpansearch.perl.org/src/JMCNAMARA/Excel-Writer-XLSX-0.84/examples/shape5.pl
To insert the image, I simply use the insert_image () method.
I use the version of perl 5.20.2 and 0.84 version of module Excel::Writer::XLSX.
Here is a simple example program that demonstrates this problem.
#!/usr/bin/perl
use strict;
use warnings;
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( 'example.xlsx' );
my $worksheet = $workbook->add_worksheet();
my $s1 = $workbook->add_shape( );
$worksheet->insert_shape( 'A1', $s1, 0, 50);
my $s2 = $workbook->add_shape();
$worksheet->insert_shape( 'A1', $s2, 0 ,150);
#Create a connector to link the two shapes.
my $cxn_shape = $workbook->add_shape( type => 'straightConnector1' );
#Link the start of the connector
$cxn_shape->set_start( $s1->get_id() );
$cxn_shape->set_start_index( 2 );
$cxn_shape->set_start_side( 'b' );
#Link the end of the connector
$cxn_shape->set_end( $s2->get_id() );
$cxn_shape->set_end_index( 0 );
$cxn_shape->set_end_side( 't' );
$worksheet->insert_shape( 'A1', $cxn_shape, 0, 0 );
#image
$worksheet->insert_image('A1', 'image.png');
__END__