You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is a workaround solution by using configureOptionsUsing() with a callback.
You can use mergeCells() function from vendor\openspout\openspout\src\Writer\XLSX\Options.php:
public function mergeCells(
int $topLeftColumn,
int $topLeftRow,
int $bottomRightColumn,
int $bottomRightRow,
int $sheetIndex = 0,
)
Example:
$firstRow = [
"First Column", // will be merged vertically with the cell below it
"Second Column", // will be merged horizontally with the right cell
"", // this value will be ignored after merge
"Fourth Column", // will be merged horizontally with the right cell
"" // this value will be ignored after merge
];
$excelRows = collect([$firstRow, ...]);
return (new FastExcel($excelRows))
->configureOptionsUsing(function ($options) {
$options->mergeCells('0', '1', '0', '2');
$options->mergeCells('1', '1', '2', '1');
$options->mergeCells('3', '1', '4', '1');
})
->withoutHeaders();
Tip: In the mergeCells() parameters the rows started from 1 and columns from 0.
I see that box spout has merge cell function but i can't figure it out where to customize it in fast-excel. How to merge cell in fast-excel?
The text was updated successfully, but these errors were encountered: