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.
Click the first cell and press Shift while you click the last cell in the range you want to merge. Important: Make sure only one of the cells in the range has data. Click Home > Merge & Center. If Merge & Center is dimmed, make sure you're not editing a cell or the cells you want to merge aren't inside a table.
":I". ($row_count+4)); Where the variable $row_count has some unpredictable dynamic value like 25, 50, 75 and so on (no regular pattern). It merges the cells as shown in the preceding snap shot as can be seen immediately below the Note cell.
$spreadsheet->getActiveSheet()->mergeCells("$range1:$range2");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With