This example merges all the cells of the range.
Range range = sheet.range("A1:E6"); range.setMergeCell(true);
Related information
MergeCell property