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 2009/07/21 11:59:06 UTC

DO NOT REPLY [Bug 47553] New: shiftRows() produce a corrupted xls file

https://issues.apache.org/bugzilla/show_bug.cgi?id=47553

           Summary: shiftRows() produce a corrupted xls file
           Product: POI
           Version: 3.2-FINAL
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: antonio.APG@gmail.com


Created an attachment (id=24011)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24011)
Template

Hi,

I prove this code and the result is a corrupted xls file.

        HSSFWorkbook wb=null;
        File plantilla = new File("/plantillas/PlantillaPrueba.xls");
        try {
            FileInputStream is=new FileInputStream(plantilla);
            wb = new HSSFWorkbook(is);


            HSSFSheet hoja = wb.getSheetAt(1);
            int i = 11;
            int j = hoja.getLastRowNum();
            int num = 10;
            hoja.shiftRows(i, j, num);

            File resp = new File("/plantillas/prueba.xls");    

            OutputStream fileOut = new FileOutputStream(resp);
            wb.write(fileOut);
            fileOut.flush();
            fileOut.close();
            is.close();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

I think that the problem ocurred when shiftrows is called, because when I
comment this line the xls is obtained well formed.

In the attachment file you can ontain the template file use for the example.

thanks.

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

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


DO NOT REPLY [Bug 47553] shiftRows() produce a corrupted xls file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47553


Yegor Kozlov <ye...@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #3 from Yegor Kozlov <ye...@dinom.ru>  2009-07-25 04:09:38 PST ---
I confirmed that your test works with current trunk, so there is nothing to
fix.

POI 3.5+ requires JDK 1.5. If you need to run it on 1.4, try to use
RetroWeaver: 
http://retroweaver.sourceforge.net/

This tool transforms Java class files compiled by a 1.5 compiler into version
1.4 class files which can then be run on any 1.4 virtual machine.

Yegor

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

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


DO NOT REPLY [Bug 47553] shiftRows() produce a corrupted xls file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47553


Antonio Perez Garcia <an...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #24019|xls obtained, when is       |xls obtained when it is
        description|openned appear a message    |opened an error message
                   |error                       |appears




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

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


DO NOT REPLY [Bug 47553] shiftRows() produce a corrupted xls file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47553





--- Comment #2 from Antonio Perez Garcia <an...@gmail.com>  2009-07-24 05:48:36 PST ---
I tested version 3.5 of POI and works fine, the only problem I have is that my
application has to work on java1.4 :S

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

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


DO NOT REPLY [Bug 47553] shiftRows() produce a corrupted xls file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47553





--- Comment #1 from Antonio Perez Garcia <an...@gmail.com>  2009-07-22 00:06:11 PST ---
Created an attachment (id=24019)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24019)
xls obtained, when is openned appear a message error

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

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


DO NOT REPLY [Bug 47553] shiftRows() produce a corrupted xls file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47553


Antonio Perez Garcia <an...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P1
         OS/Version|Windows XP                  |All
           Severity|normal                      |critical




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

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