title: Merging cells in Excel using Apache POI
body: <p>Is there any other way to merge cells in Excel using Apache POI library?</p>
  
  <p>I was trying using the following, but its not working</p>
  
  <pre><code>// selecting the region in Worksheet for merging data
  CellRangeAddress region = CellRangeAddress.valueOf("A" + rowNo + ":D"
              + rowNo);
  
  // merging the region
  sheet1.addMergedRegion(region);
  </code></pre>