Hi,
I try to use POI 3.5 beta to extract text from Office 2007, it works
for xlsx and xlsm types, but failed to process xlsb type (Excel
Binary Workbook) with error:
org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException
at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFact
ory.java:60)
at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:236)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:1
60)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:1
73)
at org.apache.poi.xssf.extractor.XSSFExcelExtractor.<init>(XSSFExcelExtr
actor.java:45)
at TestPOI.extractXExcel(TestPOI.java:93)
at TestPOI.main(TestPOI.java:35)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFact
ory.java:58)
... 6 more
Caused by: java.io.CharConversionException: Characters larger than 4 bytes are n
ot supported: byte 0x96 implies a length of more than 4 bytes
at org.apache.xmlbeans.impl.piccolo.xml.UTF8XMLDecoder.decode(UTF8XMLDec
oder.java:162)
at org.apache.xmlbeans.impl.piccolo.xml.XMLStreamReader$FastStreamDecode
r.read(XMLStreamReader.java:762)
at org.apache.xmlbeans.impl.piccolo.xml.XMLStreamReader.read(XMLStreamRe
ader.java:162)
at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yy_refill(PiccoloLe
xer.java:3474)
at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yylex(PiccoloLexer.
java:3958)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yylex(Piccolo.java:1290)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yyparse(Piccolo.java:140
0)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:714)
at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3439
)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:12
70)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:12
57)
at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaType
LoaderBase.java:345)
at org.openxmlformats.schemas.spreadsheetml.x2006.main.StyleSheetDocumen
t$Factory.parse(Unknown Source)
at org.apache.poi.xssf.model.StylesTable.readFrom(StylesTable.java:101)
at org.apache.poi.xssf.model.StylesTable.<init>(StylesTable.java:90)
... 11 more
Thanks very much for helps, Lisheng
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]