Merging the multiple rows does not work as expected. Below is the code snippet
for col in xrange(min_col, max_col + 1): for row in xrange(min_row, max_row + 1): if not (row == min_row and col == min_col): # PHPExcel adds cell and specifically blanks it out if it doesn't exist self._get_cell('%s%s' % (get_column_letter(col), row)).value = None self._get_cell('%s%s' % (get_column_letter(col), row)).merged = True
For example, Assume I have a range of B-Q columns (16 columns and n rows), if I want to merge the cells from E4 to F5. The above code will fail in the merge. Please let me if it is correct. It would merge only E4,E5,F4 and F5 instead of E4-E17 and F1-F5 in the excel file. Attaching the sample file to take a look at the merge. My aim is to merge from E4-Q6 but it did not merge B5,C5 etc.