You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2007/08/02 13:34:50 UTC

DO NOT REPLY [Bug 43015] New: - HSSFRow.getLastCellNum() works incorrectly.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43015>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43015

           Summary: HSSFRow.getLastCellNum() works incorrectly.
           Product: POI
           Version: 3.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: Bina@math.spbu.ru


Performs test:
1.
HSSFWorkbook workbook = new HSSFWorkbook();
HSSFSheet sheet = workbook.createSheet();
HSSFRow row = sheet.createRow((short) 0);
row.createCell((short) 0);
System.out.println("FIRST CELL NUM: " + row.getFirstCellNum()
    + "; " + " LAST CELL NUM: " + row.getLastCellNum());
Console results:
EXPECTED: FIRST CELL NUM: 0;  LAST CELL NUM: 1
OBSERVED: FIRST CELL NUM: 0;  LAST CELL NUM: 0

Java-doc says:
/**
     * gets the number of the last cell contained in this row <b>PLUS ONE</b>. 
     * @return short representing the last logical cell in the row <b>PLUS ONE</
b>, or -1 if the row does not contain any cells.
     */

    public short getLastCellNum()

If we performs this test for sheet that read from file all is ok.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 43015] - HSSFRow.getLastCellNum() works incorrectly.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43015>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43015





------- Additional Comments From andy_tokarev@users.sourceforge.net  2007-08-22 05:07 -------
I think that this bug becomes only when we create and save new Excel file.
When we read file that was saved by Excel evrything works good.(In reply to 
comment #0)
> Performs test:
> 1.
> HSSFWorkbook workbook = new HSSFWorkbook();
> HSSFSheet sheet = workbook.createSheet();
> HSSFRow row = sheet.createRow((short) 0);
> row.createCell((short) 0);
> System.out.println("FIRST CELL NUM: " + row.getFirstCellNum()
>     + "; " + " LAST CELL NUM: " + row.getLastCellNum());
> Console results:
> EXPECTED: FIRST CELL NUM: 0;  LAST CELL NUM: 1
> OBSERVED: FIRST CELL NUM: 0;  LAST CELL NUM: 0
> 
> Java-doc says:
> /**
>      * gets the number of the last cell contained in this row <b>PLUS ONE</
b>. 
>      * @return short representing the last logical cell in the row <b>PLUS 
ONE</
> b>, or -1 if the row does not contain any cells.
>      */
> 
>     public short getLastCellNum()
> 
> If we performs this test for sheet that read from file all is ok.

(In reply to comment #0)
> Performs test:
> 1.
> HSSFWorkbook workbook = new HSSFWorkbook();
> HSSFSheet sheet = workbook.createSheet();
> HSSFRow row = sheet.createRow((short) 0);
> row.createCell((short) 0);
> System.out.println("FIRST CELL NUM: " + row.getFirstCellNum()
>     + "; " + " LAST CELL NUM: " + row.getLastCellNum());
> Console results:
> EXPECTED: FIRST CELL NUM: 0;  LAST CELL NUM: 1
> OBSERVED: FIRST CELL NUM: 0;  LAST CELL NUM: 0
> 
> Java-doc says:
> /**
>      * gets the number of the last cell contained in this row <b>PLUS ONE</
b>. 
>      * @return short representing the last logical cell in the row <b>PLUS 
ONE</
> b>, or -1 if the row does not contain any cells.
>      */
> 
>     public short getLastCellNum()
> 
> If we performs this test for sheet that read from file all is ok.

I think that this bug becomes only when we create and save new Excel file by 
POI.
When we read file that was saved by Excel evrything works good. 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org