$excel->Workbooks(1)->Worksheets('Sheet1')->Range($a,$b)->{MergeCells} = 1; whare $a = Cells(1,2); and $b = Cells(1,4);