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.
Asked
Active
Viewed 2.3k times
2 Answers
21
$spreadsheet->getActiveSheet()->mergeCells("$range1:$range2");

Cholowao
- 947
- 12
- 18
-
8'$range1:$range2' should be "$range1:$range2" because php interprete that single `'` as all string – Pascal Tovohery Mar 06 '19 at 08:53
0
$spreadsheet->getActiveSheet()->mergeCells("from:to");
exemple: $spreadsheet->getActiveSheet()->mergeCells("A1:F1");

minh_hyng
- 1
- 1
-
As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 25 '23 at 13:02