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 2011/12/07 13:33:54 UTC

DO NOT REPLY [Bug 52300] New: Corrupted File after sheetCopy()

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

             Bug #: 52300
           Summary: Corrupted File after sheetCopy()
           Product: POI
           Version: 3.8-dev
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: stefan.helfert@googlemail.com
    Classification: Unclassified


Created attachment 28048
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28048
Template File

Hi, 

Iam using templateFiles (*.xlt) and want to copy some sheets to reuse them.
The template files contains a image.

But during the copy progress I got the following error:
WARNING: 8 bytes remaining but no space left

When I want to open the new file afterwards I got a Errormessage and Excel
repairs it.

After that the file is open and still looks good (Image is on both sheets).

I attached the template file and a litte Testprogram.

public class POITemplateCopyTest {

    /**
     * @param args
     * @throws IOException 
     */
    public static void main(String[] args) throws IOException {
    InputStream is = new FileInputStream(new
File("D:\\BugReport\\SourceTemplate.xlt"));
    POIFSFileSystem poifs = new POIFSFileSystem(is);
    HSSFWorkbook wb = new HSSFWorkbook(poifs);
    is.close();

    wb.cloneSheet(1);

    wb.write(new FileOutputStream(new
File("D:\\BugReport\\TemplateTestCopy.xls")));
    System.out.println("Done");

    }

}

-- 
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 52300] Corrupted File after cloneSheet()

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

Stefan Helfert <st...@googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Corrupted File after        |Corrupted File after
                   |sheetCopy()                 |cloneSheet()

-- 
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 52300] Corrupted File after sheetCopy()

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

--- Comment #1 from Stefan Helfert <st...@googlemail.com> 2011-12-07 12:34:16 UTC ---
Created attachment 28049
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28049
Created corrupted File

-- 
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 52300] Corrupted File after sheetCopy()

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

--- Comment #2 from Stefan Helfert <st...@googlemail.com> 2011-12-07 12:34:30 UTC ---
Created attachment 28050
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28050
Testprogram

-- 
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 52300] Corrupted File after cloneSheet()

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

Evgeniy Berlog <su...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |53010

-- 
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 52300] Corrupted File after cloneSheet()

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

--- Comment #5 from Ant0xA <an...@epam.com> 2011-12-12 13:25:16 UTC ---
Created attachment 28067
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28067
Xls-file with 20 images and 3 shapes

During cloning the shape with name "cb_en" of this file occurs an exception.

-- 
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 52300] Corrupted File after cloneSheet()

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

--- Comment #4 from Ant0xA <an...@epam.com> 2011-12-12 13:12:49 UTC ---
Hi. I had even bug. More often it becomes apparent for cloning sheets with
shapes. 
And when I clone sheet with 20 images and 3 shapes, I have exception:
WARNING: 32 bytes remaining but no space left
WARNING: 136 bytes remaining but no space left
WARNING: 32 bytes remaining but no space left
WARNING: 136 bytes remaining but no space left
WARNING: 32 bytes remaining but no space left
WARNING: 136 bytes remaining but no space left
WARNING: 32 bytes remaining but no space left
WARNING: 136 bytes remaining but no space left
Exception in thread "main" org.apache.poi.hssf.record.RecordFormatException:
9192 bytes written but getRecordSize() reports 9296
    at
org.apache.poi.hssf.record.EscherAggregate.serialize(EscherAggregate.java:488)
    at
org.apache.poi.hssf.usermodel.HSSFWorkbook$SheetRecordCollector.serialize(HSSFWorkbook.java:1263)
    at
org.apache.poi.hssf.usermodel.HSSFWorkbook.getBytes(HSSFWorkbook.java:1309)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:1209)
    at TestWorkbookCreating.main(TestWorkbookCreating.java:44)

I added this file to attachments.

-- 
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


[Bug 52300] Corrupted File after cloneSheet()

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

Evgeniy Berlog <su...@gmail.com> changed:

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

--- Comment #6 from Evgeniy Berlog <su...@gmail.com> ---
This problem should be fixed in trunk.

Please try with a nightly build - see download links on http://poi.apache.org/
or build yourself from SVN trunk, see http://poi.apache.org/subversion.html

-- 
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 52300] Corrupted File after cloneSheet()

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

Ant0xA <an...@epam.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anton_bastynets@epam.com

--- Comment #3 from Ant0xA <an...@epam.com> 2011-12-12 12:51:09 UTC ---
*** Bug 52312 has been marked as a duplicate of this bug. ***

-- 
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 52300] Corrupted File after cloneSheet()

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

Ralf <vo...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |void.at@gmail.com

-- 
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