Ok, could you tel me please which version of Which poi version are you using? cheers
--Filippo 2009/5/28 Roberto Santini <[email protected]> > 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 <[email protected]> > A : POI Users List <[email protected]>, > [email protected] > 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 > > <[email protected]> > > > > > 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: [email protected] > > > Skype: cent89 > > > > > > > > ---------------------------------------------------------- > > > ----------- To unsubscribe, e-mail: > > > [email protected] For additional commands, > > e-mail: [email protected] > > > > > > > > ------------------------------------------------------------------- > Roberto Santini > www.lasfidacontinua.it > > MSN: [email protected] > Skype: cent89 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >
