When I am trying to merge 2 XSLFTableCell cells horizontally or Vertically using the XSLFTable.mergeCells() function the border that is applied on the original cell does not get added to the merged Cell and when I try to do the same manually by getting the specific merged Cell from the table and apply border manually, it does not allow me to do the same. This is a major blocker for the application I am working on and I am unable to find anything on this. I request you to look into this and revert back with the solution as soon as possible.
Could you try the latest version (3.17) and the dev version (by compiling the latest source - https://poi.apache.org/subversion.html)? https://www.docx4java.org/trac/docx4j may also be an option.
I do this all the time, can you post some code that fails?
Please keep in mind that this is an all-volunteer driven open source project, nobody is paid to work on it. All support/work is done in peoples free and unpaid time. Therefore "requesting to look into it" and "as soon as possible" is highly inappropriate.
(In reply to sakshijuyal12690 from comment #0) > ... and when I try to do the > same manually by getting the specific merged Cell from the table and apply > border manually, it does not allow me to do the same. Works for me - tested with Libre Office. the table_test.pptx is located at [1]. You need to attach your slideshow and the manual version of your code. try (XMLSlideShow ppt = XSLFTestDataSamples.openSampleDocument("table_test.pptx")) { XSLFTable tab = (XSLFTable)ppt.getSlides().get(0).getShapes().get(0); tab.mergeCells(0, 1, 1, 1); XSLFTableCell cell = tab.getCell(0, 1); cell.setBorderColor(BorderEdge.bottom, Color.red); try (FileOutputStream fos = new FileOutputStream("merge.pptx")) { ppt.write(fos); } } [1] https://svn.apache.org/repos/asf/poi/trunk/test-data/slideshow/table_test.pptx
int colspan = Integer.parseInt(cellStyle.getColSpan()); int finalcolSpan = colspan; boolean isMergeRequired = false; while(finalcolSpan > 1) { XSLFTableCell cell1 = contentRow.addCell(); setCellHeight(cellStyle, contentRow, pageHeight); isMergeRequired = true; finalcolSpan--; if (isMergeRequired) { tb1.mergeCells(rowNum, rowNum, colIndex, colIndex+colspan-1); } // failing at this line XSLTableCell cell = tb1.getCell(1,2); cell.setBorderColor(BorderEdge.bottom, Color.RED); When I am trying to manually get the Cell from the table and apply Border Color to the Cell and when I am trying to open the ppt, I am getting a pop up that power point detected a problem an is attempting to repair it and when I finally open the ppt, I cannot see the changes.
I am using version 3.14 of apache POI