{ row=sheet.createRow(0); cell=row.createCell(0); cell.setCellValue("header"); cell=row.createCell(1); sheet.addMergedRegion(new CellRangeAddress(0,0,0,1)); row=sheet.createRow(1); cell=row.createCell(0); cell.setCellValue("Keys"); cell=row.createCell(1); cell=row.setCellValue("Values"); row=sheet.createRow(2); cell=row.createCell(0); cell.setCellValue("No data"); cell=row.createCell(1); sheet.addMergedRegion(new CellRangeAddress(1,1,0,1); sheet.autoSizeColumn(0); } autosize is working when I merged two columns of row zero, but after merging two columns of second row autosize is not working.. thanks in advance...