Bug 47813

Summary: Problems with XSSFWorkbook.removeSheetAt when workbook contains chart
Product: POI Reporter: David Agnew <prescindor>
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X 10.4   
Attachments: Test case to demonstrate problems with XSSFWorkbook.removeSheetAt.

Description David Agnew 2009-09-09 22:14:21 UTC
Created attachment 24243 [details]
Test case to demonstrate problems with XSSFWorkbook.removeSheetAt.

Application modifies a template worksheet to which a separate chart refers. It
then attempts to delete a control sheet containing parameters for the run. In
my app, it deletes the chart instead, leaving the control sheet in the output
workbook.

I've attached a test case which demonstrates the above, as well as throwing a
XmlValueDisconnectedException when there are two "control" sheets to delete.

It works properly if the chart is the last item in the workbook.
Comment 1 David Agnew 2009-09-09 22:20:22 UTC
The problematic workbooks were created by Excel 2008 for Mac, version 12.2.1.
Comment 2 Yegor Kozlov 2009-09-13 07:49:29 UTC
Fixed in r814176

Sheets of type 'chartsheet' were not supported and XSSFWorkbook.removeSheetAt actually modified wrong data. 

Yegor