Bug 58418 - Applying Auto Filter on SXSSFSheet leads to corrupt excel
Summary: Applying Auto Filter on SXSSFSheet leads to corrupt excel
Status: RESOLVED WORKSFORME
Alias: None
Product: POI
Classification: Unclassified
Component: SXSSF (show other bugs)
Version: 3.9-FINAL
Hardware: PC All
: P2 critical (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-16 09:40 UTC by RatiKanata Pal
Modified: 2016-02-15 19:36 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RatiKanata Pal 2015-09-16 09:40:57 UTC
Hi,
I am trying to using auto filter of SXSSFSheet.


sheet.setAutoFilter(new CellRangeAddress(gFilterStartRow,
						gFilterEndRow, 1, visibleColumn.size()));
 
but my file leads to corrupt.Than I am repairing the excel after that the only difference I can see is  workbook.xml



------------POI
<?xml version="1.0" encoding="UTF-8"?>
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
	xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
	<workbookPr date1904="false" />
	<bookViews>
		<workbookView activeTab="0" />
	</bookViews>
	<sheets>
		<sheet name="COVER PAGE" r:id="rId3" sheetId="1" />
		<sheet name="C04T03R05" r:id="rId4" sheetId="2" />
		<sheet name="DISCLAIMER" r:id="rId5" sheetId="3" />
	</sheets>
	<definedNames>
		<definedName name="_xlnm._FilterDatabase" localSheetId="1"
			hidden="true">C04T03R05!$B$1:$F$68</definedName>
	</definedNames>
</workbook>

-----------Repaired Excel

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
	xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
	<fileVersion appName="xl" lastEdited="4" lowestEdited="4"
		rupBuild="4505" />
	<workbookPr defaultThemeVersion="124226" />
	<bookViews>
		<workbookView xWindow="240" yWindow="525" windowWidth="15015"
			windowHeight="7365" activeTab="1" />
	</bookViews>
	<sheets>
		<sheet name="COVER PAGE" sheetId="1" r:id="rId1" />
		<sheet name="C04T03R05" sheetId="2" r:id="rId2" />
		<sheet name="DISCLAIMER" sheetId="3" r:id="rId3" />
	</sheets>
	<definedNames>
		<definedName name="_xlnm._FilterDatabase" localSheetId="1"
			hidden="1">'C04T03R05'!$B$1:$F$68</definedName>
	</definedNames>
	<calcPr calcId="124519" />
	<fileRecoveryPr repairLoad="1" />
</workbook>


------------------------------------------------------------------
Excel POI Version:
-------------------------
<definedNames>
		<definedName name="_xlnm._FilterDatabase" localSheetId="1"
			hidden="true">C04T03R05!$B$1:$F$68</definedName>
	</definedNames>

Excel repaired Version:
-------------------------
	<definedNames>
		<definedName name="_xlnm._FilterDatabase" localSheetId="1"
			hidden="1">'C04T03R05'!$B$1:$F$68</definedName>
	</definedNames>


quotes missing in sheet name.Thats leads to corrupt .I have try to put quotes in the sheet name and file is opening fine.
Comment 1 Dominik Stadler 2015-12-04 15:54:41 UTC
Can you provide some self-suffient sample code which shows how you produce the corrupted file? Ideally as unit-test with only the bare minimum on steps to show the problem. 

This will make it much easier for anybody else to reproduce and analyze the problem.
Comment 2 Dominik Stadler 2016-02-15 19:36:16 UTC
Not enough information and no response, therefore closing this, please reopen with more information (ideally a self-sufficient unit-test and any required sample documents) if this is still a problem for you.