Bug 40596 - to set cell border
Summary: to set cell border
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-24 23:17 UTC by Kumar
Modified: 2007-04-15 00:17 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kumar 2006-09-24 23:17:02 UTC
I want to draw border for header cells. I tried using 

 HSSFCellStyle headerStyle = workBook.createCellStyle();
 headerStyle.setBorderTop((short)50);

but still I'm not getting solid line. I'm new to this API. Please help me to 
get to the speed.

Do you have any documentation for HSSF component? Please send me the URL.
Comment 1 Yegor Kozlov 2007-04-15 00:17:34 UTC
Use HSSFCellStyle.BORDER_* constants to set cell border:

 HSSFCellStyle headerStyle = workBook.createCellStyle();
 headerStyle.setBorderTop(HSSFCellStyle.BORDER_THIN);
 headerStyle.setRightBorderColor(HSSFColor.BLACK.index);

P.S. Next time please post usage questions in poi-user mailing list.

Yegor