Created attachment 28999 [details] Example to recreate the issue. Kind of hard to explain but can be clearly seen by running the attached example. If a merged region is added to the workbook which spans multiple rows and these rows have not yet been added via sheet.createRow(), the borders around the merged region are lost when a row is added to the sheet with the same row index as the lower bound of the merged region. Affects both HSSF and XSSF workbooks. Creating the merged region after all rows have been added shows the expected behaviour.
Okay, excuse my stupidity. There is no need to call createRow() after the merge as the rows have already been inserted by the merge operation.