You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Nick Burch <ni...@alfresco.com> on 2010/02/19 21:44:20 UTC

Re: Exception in thread "main" java.io.IOException: Could not find all blocks

On Fri, 19 Feb 2010, William Lindner, III wrote:
> The file was not originally written by Microsoft Excel, so I would 
> assume this is the problem.  Unfortunately, I do not have the ability to 
> change how the file is created.

You might be able to put a workaround into poifs. The place it's breaking 
is fairly hairy low-level code, but if you read the microsoft docs (and/or 
fat filesystem docs, as ole2 is similar), you might be able to work up a 
patch that handles this situation

> Is there any automatic/programmatic approach to "fixing" the file by 
> opening it in Excel and saving it?

Asking openoffice to do it for you is the usual way. You can control an 
openoffice instance from java, provided you put the appropriate 
synchronized blocks around it as you're basically just scripting the 
single threaded gui...

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org