poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filippo Balicchia <filippo.balicc...@gmail.com>
Subject Re: Error with a XLS file
Date Thu, 28 May 2009 09:56:30 GMT
if you try to open the file you can find on the top the following chars
. This is (BOM) Byte Order Mark of Unicode Standard.

Probably you save the xls file with UTF-8 with BOM

Try 2 understand how you save xls.

Cheers

--Filippo

2009/5/28 Roberto Santini <roberto.santini@lasfidacontinua.it>

> Oh sorry: poi-3.2-FINAL-20081019
>
> By
> ----- Segue Messaggio Originale  -----
> Da : Filippo Balicchia <filippo.balicchia@gmail.com>
> A : POI Users List <user@poi.apache.org>
> oggetto : Re: Error with a XLS file
> Data : Thu, 28 May 2009 11:29:42 +0200
>
> > Ok,
> > could you tel me please which version of Which poi version
> >  are you using? cheers
> >
> > --Filippo
> >
> > 2009/5/28 Roberto Santini
> > <roberto.santini@lasfidacontinua.it>
> >
> > > Hi, thi is the java file:
> > > ----
> > > POIFSFileSystem fs = null;
> > >    HSSFSheet sheet=null;
> > >    try{
> > >    fs = new POIFSFileSystem(new
> > > FileInputStream("/home/roberto/Dropbox/dmgg5o5e.xls"));
> > >    }catch (Exception e){
> > >        System.err.println("ERRORE1: "+e);
> > >    }
> > >    try{
> > >    HSSFWorkbook wb = new HSSFWorkbook(fs);
> > >    //sheet = wb.getSheetAt((short) 1); //Foglio
> > >    sheet = wb.getSheet("IncomingSMS");
> > >    }catch (Exception e){
> > >        System.err.println("ERRORE2: "+e);
> > >    }
> > >    int
> > > totRighe=sheet.getLastRowNum()-sheet.getFirstRowNum()+1;
> > >    for(int i=1;i<totRighe;i++){
> > >        //riga corrente
> > >         HSSFRow row = sheet.getRow(i);
> > >         //celle
> > >         HSSFCell senderCell = row.getCell(3);
> > >         HSSFCell messageCell = row.getCell(4);
> > >         HSSFCell correctCell = row.getCell(6);
> > >         //valori
> > >         String sender=senderCell.getStringCellValue();
> > >         String message=messageCell.getStringCellValue();
> > >         String correct=correctCell.getStringCellValue();
> > >         System.out.println("SENDER: "+sender);
> > >         System.out.println("MESSAGE: "+message);
> > >         System.out.println("CORRECT: "+correct);
> > >    }
> > > ----
> > > The excel file is attached. I've contacted the author,
> > > is a Excel XML file format.
> > > Bye
> > >
> > > ----- Segue Messaggio Originale  -----
> > > Da : Filippo Balicchia <filippo.balicchia@gmail.com>
> > > A : POI Users List <user@poi.apache.org>,
> > > roberto.santini@lasfidacontinua.it
> > > oggetto : Re: Error with a XLS file
> > > Data : Thu, 28 May 2009 10:37:35 +0200
> > >
> > > > Which hssf version  are you using?
> > > >
> > > > Please attach the example file
> > > >
> > > > Cheers
> > > >
> > > > --Filippo
> > > >
> > > > 2009/5/28 Roberto Santini
> > > > <roberto.santini@lasfidacontinua.it>
> > > >
> > > > > Hi to all, I0m a new ITALIAN member.
> > > > > I've a problem reading an XLS file; this file is
> > > > > automatically generated by an ASPX page.
> > > > > The error I'm getting is:
> > > > >
> > > > > java.io.IOException: Invalid header signature; read
> > > > > 7813033141555149807, expected -2226271756974174256
> > > > >
> > > > > There is a way to solve or the file is generated
> > > > > with an error so I can't read it?
> > > > > If i try to open the same file with Office, it run!
> > > > >
> > > > > Bye
> > > > > Roberto
> > > > >
> > > > >
> > > >
> > > > >
> > ----------------------------------------------------------
> > > > > --------- Roberto Santini www.lasfidacontinua.it
> > > > >
> > > > > MSN: roberto.santini@lasfidacontinua.it
> > > > > Skype: cent89
> > > > >
> > > > >
> > > >
> > > > >
> > ----------------------------------------------------------
> > > > > ----------- To unsubscribe, e-mail:
> > > > user-unsubscribe@poi.apache.org For additional
> > > > commands, e-mail: user-help@poi.apache.org > >
> > > >
> > >
> > >
> > ----------------------------------------------------------
> > > --------- Roberto Santini
> > > www.lasfidacontinua.it
> > >
> > > MSN: roberto.santini@lasfidacontinua.it
> > > Skype: cent89
> > >
> > >
> > >
> > ----------------------------------------------------------
> > > ----------- To unsubscribe, e-mail:
> > > user-unsubscribe@poi.apache.org For additional commands,
> > e-mail: user-help@poi.apache.org >
> >
>
> -------------------------------------------------------------------
> Roberto Santini
> www.lasfidacontinua.it
>
> MSN: roberto.santini@lasfidacontinua.it
> Skype: cent89
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message