You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Avik Sengupta <av...@itellix.com> on 2004/02/03 13:50:25 UTC

RE: org.apache.poi.hssf.record.RecordFormatException in Reading/Writing to an Excel File..

We've had similar reports many times, and almost every time, its turned
out to be a problem with client code, rather than in the library. 

Think about it.. if it works in windows and not in solaris, it is highly
likely that the problem is in your code. Check the file path. Check the
file permissions. Create a simple file object and see if you can read
it. Check the exception stack trace, and see where exactly the exception
is thrown. 

On Tue, 2004-02-03 at 16:09, Kommineni, Sateesh (GE Consumer &
Industrial) wrote:
> Hi ALL,
> 
>     I am using poi-2.0-RC2-20040102.zip and don't know whether org.apache.poi.hssf.record.RecordFormatException is a Bug in POI or not.
> 
>     Is it the case that i need to wait till some one finds a solution for this If it is a bug ..
> 
>     Any way thanks a lot for all the support..
> 
> -Sateesh
> 
> 
> -----Original Message-----
> From: Kommineni, Sateesh (GE Consumer & Industrial) 
> Sent: Monday, February 02, 2004 6:35 PM
> To: poi-user@jakarta.apache.org
> Subject: org.apache.poi.hssf.record.RecordFormatException in
> Reading/Writing to an Excel File..
> Importance: High
> 
> 
> Hi,
> 
>     I am try to read an Excel File and then writing to it. It is working well in Windows and giving problems in Solaris. The Exception it is giving is:
> 
>   . bin=java.io.BufferedInputStream@1118aa5
> 415. Excep in generating the WorkBook=org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance, the following exception occured: null
> 416. RecordFormatExcep in createWorkBook=org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance, the following exception occured: null
> 417. Work Book=null
> 
>   The Code i am using is given below:
> 
>  				try{
> 					bin  = new BufferedInputStream(new FileInputStream(path+FILE_NAME));
> 					System.out.println("bin="+bin);
>     				wb   = new HSSFWorkbook(bin,false);
> 				}
> 				catch(Exception ioe){
> 				   System.out.println("Excep in generating the WorkBook="+ioe);
> 				   ioe.printStackTrace();
> 					 try{  
>   						fs  = new POIFSFileSystem(new FileInputStream(path+FILE_NAME));
>     					wb = new HSSFWorkbook(fs);
>    		    		 }
> 					 catch(RecordFormatException rfe){
> 					 	System.out.println("RecordFormatExcep in createWorkBook="+rfe);
> 					 	rfe.printStackTrace();
> 					 }
> 					 catch(Exception e){
> 					    System.out.println("Excep IS="+e);
> 					    e.printStackTrace();
> 					 }
> 				}
> 				finally{
> 				   if(bin!=null) bin.close();
> 				}
> 				System.out.println("Work Book="+wb);
> 
> 
>    Pls let me know what went wrong..
> 
> Thanks a lot
> Sateesh
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 


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