如果有人知道此问题的解决方案,请回复
use strict
use Spreadsheet::WriteExcel;
my $Workbook = Spreadsheet::WriteExcel->new('cw.xls');
my $Worksheet1 = $Workbook->add_worksheet('MRD');
# Here $Groups[0] is unmerged cell
$Worksheet1->write(10,0, **$Groups[0]**,$Bg_Color);
my $i=1;
foreach my $Grp(@Groups){
my $Cell_Position = "$A2Z_Array[$i]10:$A2Z_Array[$i+1]10";
$Worksheet1->merge_range($Cell_Position,**$Grp**,$Bg_Color_1);
# Here $Grp is merged cell
$i+=2;
}
答案 0 :(得分:3)
您似乎正在使用Perl模块Spreadsheet::WriteExcel。
在您的问题中没有足够的上下文来弄清楚出了什么问题,但您可以先查看Spreadsheet :: WriteExcel文档中的merged cells examples。