Hi,

I would like to know if i can set the border properties (top, right, bottom
and left) all in one go?
Currently, i am using the below code block to do so.

CellStyle borderStyle = workbook.createCellStyle();

borderStyle.setBorderTop(CellStyle.BORDER_THIN);
borderStyle.setTopBorderColor(IndexedColors.BLACK.getIndex());
borderStyle.setBorderRight(CellStyle.BORDER_THIN);
borderStyle.setRightBorderColor(IndexedColors.BLACK.getIndex());
borderStyle.setBorderBottom(CellStyle.BORDER_THIN);
borderStyle.setBottomBorderColor(IndexedColors.BLACK.getIndex());
borderStyle.setBorderLeft(CellStyle.BORDER_THIN);
borderStyle.setLeftBorderColor(IndexedColors.BLACK.getIndex());

Is there a way i can achieve the above feature with fewer lines of code than
described above?

Regards,
Shankar
-- 
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/Is-there-a-way-to-set-the-border-properties-for-a-cellstyle-all-at-once-tp3373249p3373249.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