I don't have control over the creation of the file. It is from an external
system.
I just have to be able to ready it. Blunt force or otherwise.
It is not an option to have a user open and save it as a newer version, etc.

I am using the latest version of POI as of 6/18/04.

I need someway to force a read, or to FIX the file via code.

It isn't an issue with a slow stream; the same thing occurs if the file is
downloaded and then read from disk.
The only current fix I know is to open the file using Excel (which is
obviously more forgiving than POI) and then resaving it from there.

Thanks

Troy
----- Original Message ----- 
From: "Avik Sengupta" <[EMAIL PROTECTED]>
To: "POI Users List" <[EMAIL PROTECTED]>
Sent: Monday, June 21, 2004 11:40 PM
Subject: RE: Unable to read entire header


> A few trouble-shooting tips
>
> 1. As below, the first thing to try is to separate it from the stream
> and then read it from disk.
>
> 2. You say re-saving it in excel solves the problem.. check to see if
> the original file was saved with excel 95 (or pocket excel for win CE).
> POI supports only excel 97 onwards.
>
> 3. Which version of POI are you using. use at least 2.0, older versions
> had issues reading over slow streams.
>
> Regards
> -
> Avik
>
>
> On Tue, 2004-06-22 at 12:08, [EMAIL PROTECTED] wrote:
> > You may try separating the excel file first from the stream  then read
> > it.
> >
> > -----Original Message-----
> > From: Troy McKinnon [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, June 22, 2004 11:54 AM
> > To: [EMAIL PROTECTED]
> > Subject: Unable to read entire header
> >
> > I have a big problem, and I am hoping for an easy solution or
> > workaround.
> >
> > I am trying to read an excel file using POI, but I get the following
> > error:
> >
> > java.io.IOException: Unable to read entire header; 279 bytes read;
> > expected
> > 512 bytes
> >    at
> > org.apache.poi.poifs.storage.HeaderBlockReader.<init><HeaderBlockReader.
> > java
> > :78>
> >   ...
> >
> > If I open the file in excel and resave it.. all is good.  Unfortunately
> > I
> > don't have this option.
> > Is there some way to work around this. I am receiving the file as an
> > InputStream via Http.
> >
> > Troy
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to