I had to change coding. This little example will work:
my $workbook = Excel::Writer::XLSX->new( "Cell_Borders.xlsx" );
my $worksheet = $workbook->add_worksheet();
my $textbox1 ="Hello World!";
my $format_box = $workbook->add_format();
$worksheet->merge_range( 'A8:B8', "$textbox1", $format_box );
This will add a border on the top and bottom cell.
To fix the problem, I had to add the formatting calls individual (i.e. $format_box->set_top()) and not the to add_format() method.