Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabitha rejects strict OOXML files due to underlying Apache POI bug #29

Open
twilco opened this issue Oct 3, 2018 · 0 comments
Open
Labels

Comments

@twilco
Copy link
Contributor

twilco commented Oct 3, 2018

When trying to work with the file found at https://s3.amazonaws.com/widen-ingester-dev/StrictOOXMLException.xlsx, which is a strict OOXML file, the following exception is thrown:

java.lang.RuntimeException: java.io.IOException: org.apache.poi.POIXMLException: Strict OOXML isn't currently supported, please see bug #57699
	at io.reactivex.internal.util.ExceptionHelper.wrapOrThrow(ExceptionHelper.java:45)
	at io.reactivex.internal.observers.BlockingMultiObserver.blockingGet(BlockingMultiObserver.java:91)
	at io.reactivex.Maybe.blockingGet(Maybe.java:2275)
	at com.widen.project.temp.ImportWorker.run(ImportWorker.java:73)
	at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626)
	at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1618)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.io.IOException: org.apache.poi.POIXMLException: Strict OOXML isn't currently supported, please see bug #57699
	at com.widen.tabitha.formats.excel.XLSXRowReader.<init>(XLSXRowReader.java:82)
	at com.widen.tabitha.formats.excel.XLSXRowReader.open(XLSXRowReader.java:65)
	at com.widen.tabitha.formats.FormatRegistry$4.createReader(FormatRegistry.java:90)
	at com.widen.tabitha.reader.RowReaders.lambda$open$3(RowReaders.java:98)
	at io.reactivex.internal.operators.maybe.MaybeMap$MapMaybeObserver.onSuccess(MaybeMap.java:82)
	at io.reactivex.internal.operators.maybe.MaybeFlatten$FlatMapMaybeObserver$InnerObserver.onSuccess(MaybeFlatten.java:119)
	at io.reactivex.internal.operators.maybe.MaybeJust.subscribeActual(MaybeJust.java:36)
	at io.reactivex.Maybe.subscribe(Maybe.java:4154)
	at io.reactivex.internal.operators.maybe.MaybeFlatten$FlatMapMaybeObserver.onSuccess(MaybeFlatten.java:96)
	at io.reactivex.internal.operators.maybe.MaybeFromCallable.subscribeActual(MaybeFromCallable.java:61)
	at io.reactivex.Maybe.subscribe(Maybe.java:4154)
	at io.reactivex.internal.operators.maybe.MaybeFlatten.subscribeActual(MaybeFlatten.java:42)
	at io.reactivex.Maybe.subscribe(Maybe.java:4154)
	at io.reactivex.internal.operators.maybe.MaybeMap.subscribeActual(MaybeMap.java:40)
	at io.reactivex.Maybe.subscribe(Maybe.java:4154)
	at io.reactivex.Maybe.blockingGet(Maybe.java:2274)
	... 7 common frames omitted
Caused by: org.apache.poi.POIXMLException: Strict OOXML isn't currently supported, please see bug #57699
	at org.apache.poi.xssf.eventusermodel.XSSFReader.<init>(XSSFReader.java:78)
	at com.widen.tabitha.formats.excel.XLSXRowReader.<init>(XLSXRowReader.java:78)
	... 22 common frames omitted

The notable portion of this snippet is primarily this:

java.lang.RuntimeException: java.io.IOException: org.apache.poi.POIXMLException: Strict OOXML isn't currently supported, please see bug #57699

This is due to this Apache POI bug (#57699) - also see this related Stack Overflow post.

There might not be much we can do here, unless there is some programmatic way to convert a strict OOXML file to a non-strict OOXML file so POI accepts it. Fixing the bug in POI itself is also an option.

There are multiple ways to get a strict OOXML file - here is a screenshot of one way. This is "Save as" in Microsoft Excel for Mac.

strict_ooxml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants