Php 盒形喷口两个相邻单元合并

Php 盒形喷口两个相邻单元合并,php,xlsx,Php,Xlsx,如何在编写excel文件时合并框中的单元格。 我用下面的代码尝试了单元格合并 $customTempFolderPath = sys_get_temp_dir(); $writer = WriterFactory::create(Type::XLSX); $writer->setTempFolder($customTempFolderPath) ->setShouldUseInlineStrings(true) ->openToFile($filePath) ->addR

如何在编写excel文件时合并框中的单元格。 我用下面的代码尝试了单元格合并

$customTempFolderPath = sys_get_temp_dir();
$writer = WriterFactory::create(Type::XLSX);
$writer->setTempFolder($customTempFolderPath)
->setShouldUseInlineStrings(true)
->openToFile($filePath)
->addRowWithStyle($header, $headerStyle)
->addRowWithStyle($headerRow, $headerRowStyle)
->addRowsWithStyle($dataRows, $defaultStyle)
->addRowWithStyle($lastRow, $headerRowStyle)
->close();

使用
xlsx
更新标记幸运的是,还不支持合并单元格。您所能做的就是添加空单元格来模拟合并单元格。我已经添加了空单元格,但它不是合并单元格