Have you been able to process any files that have been altered by pocket excel? There *could* be some minor changes to the actual file level content that is causing the issue...
Thanks, Tommy Holden -----Original Message----- From: luca finzi contini [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 11:22 AM To: POI Users List Subject: Re: XLS reading problem! Leen, I'm afraid it doesn't work --- I copied the file to an 'import' directory before processing it... I believe it's something in the POI lib... Thank you so much for the suggestion! Luca. --- Leen Toelen <[EMAIL PROTECTED]> ha scritto: > Can you try to first copy the file to a temp > location and open that in > poi? Maybe the file is still in use be the previous > process or > something like that. > > Regards, > Leen Toelen > > > On 11/16/05, luca finzi contini > <[EMAIL PROTECTED]> wrote: > > Hi all, > > i'm using POI 2.5.1 to create and read XLS files. > > The xls file lifecycle is: > > - creation in my Java app; > > - activeSync'ing to a handheld device --> xls gets > > converted to Pocket Excel pxl format > > - modifying the file on the handheld > > - Active syncing back to the PC --> pxl file gets > > re-converted to xls Excel 97/2000 format. > > > > Then I try to read the xls with my java app. > > I used the code in the example at HSSF: > > ... > > FileInputStream inputStream = new > > FileInputStream(fileName); > > POIFSFileSystem fs = new POIFSFileSystem( > > inputStream ); > > HSSFWorkbook wb = new HSSFWorkbook(fs); > > ... > > > > > > I get the following exception: > > java.io.IOException: Unable to read entire block; > 295 > > bytes read; expected 512 bytes > > > > at > > > org.apache.poi.poifs.storage.RawDataBlock.<init>(RawDataBlock.java:98) > > > > at > > > org.apache.poi.poifs.storage.RawDataBlockList.<init>(RawDataBlockList.ja va:88) > > > > at > > > org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.j ava:123) > > > > at .... > > > > I found that if I open the problematic xls file > with > > Excel and re-save it, it all works fine. > > I cannot do that in production! ;-) I need to > parse > > the file directly through my app. > > Any suggestions will be highly appreciated! > > Thank you all in advance! > > Luca. > > > > > > > > > > > > > > > > ___________________________________ > > Yahoo! Mail: gratis 1GB per i messaggi e allegati > da 10MB > > http://mail.yahoo.it > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > Mailing List: > http://jakarta.apache.org/site/mail2.html#poi > > The Apache Jakarta Poi Project: > http://jakarta.apache.org/poi/ > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > Mailing List: > http://jakarta.apache.org/site/mail2.html#poi > The Apache Jakarta Poi Project: > http://jakarta.apache.org/poi/ > > ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
