Bug 22292 - the wrong border value when cell spanned
Summary: the wrong border value when cell spanned
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.0-pre2
Hardware: PC other
: P3 major (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2003-08-11 07:20 UTC by jungleguo
Modified: 2008-08-28 14:01 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description jungleguo 2003-08-11 07:20:21 UTC
I come up against a problem when dealing with border .when I span row or column 
of the cell in the excel and  use the HSSFCellStyle to get the border value, I 
found could not get the right value of BorderRight or BorderBottom.
as follows:
  private void getBorder(HSSFCell cell){
	HSSFCellStyle style=cell.getCellStyle();
	short borderBottom= style.getBorderBottom();
	short borderRight=style.getBorderRight();
	*if cell span column, the value of borderRight ==0
	*if cell span row , the value of borderBottom==0
	*that is to say , I could not get the right value 

so ,I wonder maybe it's a bug of poi. please help me!
Comment 1 jungleguo 2003-08-14 01:19:35 UTC
the new version poi has revise the bug. But it has still a little mistake.

I want to they can correct the bug completely.

thx them!
Comment 2 Avik Sengupta 2003-10-30 18:43:38 UTC
jungleguo, can u tell us what you mean by "a little mistake"? what exactly is
the behaviour you are getting and expecting? Also tell us which version you tried?

Comment 3 Josh Micich 2008-08-28 14:01:02 UTC
As an example in Excel, if I put borders on cells C3:E3 and then merge them, the internal left and right borders are cleared.  If I save the file, POI reads those borders as zero.  Consistent with this, if the cells are un-merged in Excel, the internal borders do not re-appear.  The same applies when spanning rows.

The original description was unclear, but it is possible that the bug reporter expected the borders of any cell to report the same as that of the whole merged region.

Retested OK in svn trunk (post 3.1)