Метод CellRange.setBorders
Метод предназначен для установки границ диапазона ячеек. Отдельные границы устанавливаются с помощью методов класса Borders.
Пример
Table firstSheet = document.getBlocks().getTable(0);
Cell cell = firstSheet.getCell("A1");
LineProperties lineProperties = new LineProperties();
lineProperties.style = LineStyle.Dash;
lineProperties.width = 1.5f;
lineProperties.color = new Color(new ColorRGBA(255, 0, 0, 255));
Borders newBorders = new Borders();
newBorders.setLeft(lineProperties);
newBorders.setRight(lineProperties);
newBorders.setTop(lineProperties);
newBorders.setBottom(lineProperties);
cell.setBorders(newBorders);