Bug 50314

Summary: XSSF sheet.setAutoFilter() crashes Excel by sorting.
Product: POI Reporter: Jack <duanxingjian>
Component: XSSFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: 3.7-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: if using dropdown list to choose sort A-Z, Excel would crash

Description Jack 2010-11-22 11:04:06 UTC
Created attachment 26329 [details]
if using dropdown list to choose sort A-Z, Excel would crash

After using the following code to generate a XLSX file, if you open that generated file (I attached here as "AutofilterGeneratedWithPOI.xlsx") and click autofilter to sort any of the columns, MS Excel would crash. However, if you delete the autofilter and using Excel to add it back again (I attached here as "AutofilterGeneratedWithinExcel.xlsx"), everything would work just fine. I recreated this scenario on two boxes and two separated projects.
Comment 1 Nick Burch 2010-11-22 11:10:02 UTC
Could you please create three similar, simple files?

* A basic file with no autofilter on it
* That file as edited by poi to turn on autofilter
* That file as edit by excel to turn on autofilter

Then, if you can, unzip each file in turn (.xlsx files are actually a zipfile of xml files). Use diff to see what POI did differently to what excel did. Chances are we're either setting the wrong value on an xml element, or adding one element but forgetting another. Checking the difference between POI and excel should hopefully identify what's wrong.
Comment 2 Jack 2010-11-22 11:21:25 UTC

*** This bug has been marked as a duplicate of bug 50315 ***