Dynamic Cell Merging in phpspreadsheet

Abhilash Sharma picture Abhilash Sharma · Jan 8, 2018 · Viewed 8.1k times · Source

My question is about generating an Excel sheet in codeigniter. The excel sheet sub-headings are not fixed, they are as per data, that's why i am not able to merge cells. Is there any solution for that? Ex:-Here sub-headings are not fix.

Answer

Cholowao picture Cholowao · May 16, 2018
$spreadsheet->getActiveSheet()->mergeCells("$range1:$range2");