If you want to do stuff with xlsx4j, in general you don't use POI methods!
This seems to be the pertinent XML in your sample xlsx:
Using xml Syntax Highlighting
<worksheet>
<sheetPr>
<outlinePr summaryBelow="false"/>
</sheetPr>
:
<sheetData>
:
<row r="2" hidden="true" outlineLevel="1">
:
</row>
:
<row r="11" collapsed="true">
:
</row>
Parsed in 0.001 seconds, using
GeSHi 1.0.8.4
You can generate suitable code by submitting your sample xlsx to the docx4j online webapp.
Doing that, generates code like:
Using java Syntax Highlighting
org.
xlsx4j.
sml.
ObjectFactory smlObjectFactory
= new org.
xlsx4j.
sml.
ObjectFactory();
Worksheet worksheet
= smlObjectFactory.
createWorksheet();
JAXBElement
<org.
xlsx4j.
sml.
Worksheet> worksheetWrapped
= smlObjectFactory.
createWorksheet(worksheet
);
// Create object for sheetPr
CTSheetPr sheetpr
= smlObjectFactory.
createCTSheetPr();
worksheet.
setSheetPr(sheetpr
);
// Create object for outlinePr
CTOutlinePr outlinepr
= smlObjectFactory.
createCTOutlinePr();
sheetpr.
setOutlinePr(outlinepr
);
// Create object for sheetFormatPr
CTSheetFormatPr sheetformatpr
= smlObjectFactory.
createCTSheetFormatPr();
worksheet.
setSheetFormatPr(sheetformatpr
);
sheetformatpr.
setBaseColWidth( new Long(8
) );
sheetformatpr.
setOutlineLevelRow( new Short(3
) );
sheetformatpr.
setOutlineLevelCol( new Short(0
) );
// Create object for sheetData
SheetData sheetdata
= smlObjectFactory.
createSheetData();
worksheet.
setSheetData(sheetdata
);
// Create object for row
Row row
= smlObjectFactory.
createRow();
sheetdata.
getRow().
add( row
);
row.
setR( new Long(1
) );
:
row.
setOutlineLevel( new Short(0
) );
Parsed in 0.017 seconds, using
GeSHi 1.0.8.4