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 2003/02/27 12:32:27 UTC

DO NOT REPLY [Bug 17475] New: - Removal of sheets with diagrams corrupts file

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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17475

Removal of sheets with diagrams corrupts file

           Summary: Removal of sheets with diagrams corrupts file
           Product: POI
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: HSSF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: ndz43wv02@sneakemail.com


If I use Methode removeSheetAt on a sheet which contains a diagram, Excel 2000 
SR-1 crashed when opening the modified file.

The original Excel file is a simple book created from scratch. It contains two 
sheets, each containing one simple line diagram.

The code to read, modify and write the file is as follows:

HSSFWorkbook book = new HSSFWorkbook(new FileInputStream(path));
book.removeSheetAt(0);
FileOutputStream fOut = new FileOutputStream(path);
book.write(fOut);
fOut.close();

The POI version I use is
jakarta-poi-1.11.0-dev-20030225.jar