Team,
double width = cell.getCellFormat().getBorders().getLeft().getLineWidth();String color = cell.getCellFormat().getBorders().getTop().getColor().toString();System.out.println(“Width ::” + width);System.out.println(“Color ::” + color);
Team,
double width = cell.getCellFormat().getBorders().getLeft().getLineWidth();String color = cell.getCellFormat().getBorders().getTop().getColor().toString();System.out.println(“Width ::” + width);System.out.println(“Color ::” + color);
Document doc = new Document(MyDir + "input.docx");
NodeList<Cell> cellNodes = doc.selectNodes("//Cell");
for(Cell cell : cellNodes){
double width = cell.getCellFormat().getBorders().getLeft().getLineWidth();
String color = cell.getCellFormat().getBorders().getTop().getColor().toString();
System.out.println("Width ::" + width);
System.out.println("Color ::" + color);
System.out.println("Background Color ::" + cell.getCellFormat().getShading().getBackgroundPatternColor());
}
System.out.println("------------------------------------------");
// Expand table style formatting to direct formatting.
doc.expandTableStylesToDirectFormatting();
// Now print the cell shading after expanding table styles.
for(Cell cell : cellNodes){
double width = cell.getCellFormat().getBorders().getLeft().getLineWidth();
String color = cell.getCellFormat().getBorders().getTop().getColor().toString();
System.out.println("Width ::" + width);
System.out.println("Color ::" + color);
System.out.println("Background Color ::" + cell.getCellFormat().getShading().getBackgroundPatternColor());
}