it seems this a bug. when we merging Two columns in Excel using POI API,
after applying same style to all Header columns The merged column header
appearing differently(over/thick bold). This my code.

 private void mergeCell(Row headerRow, int i, Cell cell) { 
   Cell nextCell = headerRow.getCell(i+1);
    if(null == nextCell ||
StringUtils.isBlank(nextCell.getStringCellValue())){
    cell.getSheet().addMergedRegion(new CellRangeAddress(0, 0,
cell.getColumnIndex(), i+1));
     
}
cell.setCellStyle(getCellStyle(0, 0));
}
Note: getCellStyle(0,0) - is my custom method what it will do is it will
copy style from specified row,column which existing.



--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/why-merged-columns-loosing-style-in-Apache-POI-tp5715328.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to