带有PHPSReadSheet的Codeigniter合并单元

带有PHPSReadSheet的Codeigniter合并单元,php,codeigniter,phpspreadsheet,Php,Codeigniter,Phpspreadsheet,如何在codeigniter处合并具有相同值的单元格/行 我正在使用PHPSReadSheet foreach($excel as $index => $row) { $sheet->setCellValue('A'.$x, $no++); $sheet->setCellValue('B'.$x, $row->data1); $s

如何在codeigniter处合并具有相同值的单元格/行

我正在使用PHPSReadSheet

foreach($excel as $index => $row)
            {
                    $sheet->setCellValue('A'.$x, $no++);
                    $sheet->setCellValue('B'.$x, $row->data1);
                    $sheet->setCellValue('C'.$x, $row->data2);
                    $sheet->setCellValue('D'.$x, $row->data3);
                    
                    // $sheet->mergeCells("$??:$??");
                    $x++;
                    
            }
我不知道如何让第一行和最后一行具有相同的值,以便在codeigniter处合并