java - STSheetViewType class is missing in poi-ooxml-schemas-3.14 JAR -


currently i'm trying implement code given in answer this question:

ctsheetview view =  sheet.getctworksheet().getsheetviews().getsheetviewarray(0); view.setview(stsheetviewtype.page_layout); 

but poi-ooxml-schemas (version 3.14) jar file not contain class stsheetviewtype. delved poi-ooxml-schemas jar file (using 7zip) , found class file stsheetviewtype$enum.class existed within path:

org.openxmlformats.schemas.spreadsheetml.x2006.main.stsheetviewtype$enum.class

but (if i'm not mistaken) '$' signifies inner/nested class, meaning stsheetviewtype enum encapsulated within class. checked documentation on stsheetviewtype class in older version of poi-ooxml-schemas (version 1.1) here , found class stsheetviewtype contained inner enum stsheetviewtype.enum.

this seems confirmed errors i'm receiving within eclipse. these errors when using code shown above:

"stsheetviewtype cannot resolved variable"

"the type org.openxmlformats.schemas.spreadsheetml.x2006.main.stsheetviewtype cannot resolved. indirectly referenced required .class files"

which further makes me believe stsheetviewtype.enum missing parent stsheetviewtype class file. why? checked documentation on new version of poi-ooxml-schemas-3.14 , found no mention of stsheetviewtype in changelogs. i've downloaded binary zip file poi several times ensure download wasn't faulty, downloaded source , tried building jars class file missing each time.

i found class stsheetviewtype seemingly same functionality held in jar file here can't seem import class correctly. such thing possible? or must class file come poi-ooxml-schemas-3.14 jar file?

ultimately i'd find out how make above code compatible current version of poi-ooxml-schemas-3.14 jar. information or insight shed on appreciated.

as pointed out @axelrichter , faq, apache poi 3.14 , above uses subset of classes ooxml-schemas-1.3.jar. need jar file , include in classpath instead of poi-ooxml-schemas-3.14.jar. poi provides ooxml schemas classes requires. when begin directly call ooxml schema classes in own code, have full jar has ooxml schemas classes avoid kind of issue have. can jar maven central:

http://central.maven.org/maven2/org/apache/poi/ooxml-schemas/1.3/

see faq entry @ http://poi.apache.org/faq.html#faq-n10025


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -