Results 1 to 3 of 3
- 10-30-2009, 11:28 AM #1
Member
- Join Date
- Oct 2009
- Posts
- 3
- Rep Power
- 0
java.lang.RuntimeException: Expected an EXTERNSHEET record but got (org.apache.poi.hs
Hi All,
I have developed a Core Java application for converting excel to csv files(in Eclipse galileo) using poi3.5beta2.jar. I'm able to covert excel to csv.
Note: The excel files i am processing are 97-2003 version files.
**************
Yesterday when i was executing a excel file, I got
"java.lang.RuntimeException: Expected an EXTERNSHEET record but got (org.apache.poi.hssf.record.SSTRecord)
at org.apache.poi.hssf.model.LinkTable.readExtSheetRe cord(LinkTable.java:188)
at org.apache.poi.hssf.model.LinkTable.<init>(LinkTab le.java:164)
at org.apache.poi.hssf.model.Workbook.createWorkbook( Workbook.java:250)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>( HSSFWorkbook.java:278)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>( HSSFWorkbook.java:201)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>( HSSFWorkbook.java:183)
at com.bloomberg.mtge.cmbs.roll.util.ExcelToCsvConver ter.convertBySheetTypeMultipleTCS(ExcelToCsvConver ter.java:634)
at com.bloomberg.mtge.cmbs.roll.util.ExcelToCsvConver ter.main(ExcelToCsvConverter.java:967)
30 Oct, 2009 4:17:54 PM com.bloomberg.mtge.cmbs.roll.util.ExcelToCsvConver ter convertBySheetTypeMultipleTCS
SEVERE: Failed Converting to .csv format e : C:\Users\test\Desktop\CMBS INFO FILES\Mukund Mail Files\santosh files\lsOct09\AMRESCO1997C1_delinqReport0910.xls Count => 1
java.lang.NullPointerException
at com.bloomberg.mtge.cmbs.roll.util.ExcelToCsvConver ter.convertBySheetTypeMultipleTCS(ExcelToCsvConver ter.java:641)
at com.bloomberg.mtge.cmbs.roll.util.ExcelToCsvConver ter.main(ExcelToCsvConverter.java:967)".
*****************
When i tried to debug, i found that
HSSFWorkbook wb = null;
POIFSFileSystem fs = null;
try
{
fs = new POIFSFileSystem(new FileInputStream(excelFile));
wb = new HSSFWorkbook(fs);
}
catch(Exception e)
{
e.printStackTrace();
}
wb in the try block was null and an exception was throw like Null pointer exception.
But when i opened the file and saved the file(without any changes) the size of excel file got reduced, and when i run my application the csv file was generated with out any error...
I have 100+ files which are giving this problems....
So i canot manually try to open and save...
Pls help me...Thanks in Adance....
- 10-30-2009, 11:29 AM #2
Member
- Join Date
- Oct 2009
- Posts
- 3
- Rep Power
- 0
java.lang.RuntimeException: Expected an EXTERNSHEET record but got (org.apache.poi.hs
Hi All,
I have developed a Core Java application for converting excel to csv files(in Eclipse galileo) using poi3.5beta2.jar. I'm able to covert excel to csv.
Note: The excel files i am processing are 97-2003 version files.
**************
Yesterday when i was executing a excel file, I got
"java.lang.RuntimeException: Expected an EXTERNSHEET record but got (org.apache.poi.hssf.record.SSTRecord)
at org.apache.poi.hssf.model.LinkTable.readExtSheetRe cord(LinkTable.java:188)
at org.apache.poi.hssf.model.LinkTable.<init>(LinkTab le.java:164)
at org.apache.poi.hssf.model.Workbook.createWorkbook( Workbook.java:250)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>( HSSFWorkbook.java:278)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>( HSSFWorkbook.java:201)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>( HSSFWorkbook.java:183)
at com.bloomberg.mtge.cmbs.roll.util.ExcelToCsvConver ter.convertBySheetTypeMultipleTCS(ExcelToCsvConver ter.java:634)
at com.bloomberg.mtge.cmbs.roll.util.ExcelToCsvConver ter.main(ExcelToCsvConverter.java:967)
30 Oct, 2009 4:17:54 PM com.bloomberg.mtge.cmbs.roll.util.ExcelToCsvConver ter convertBySheetTypeMultipleTCS
SEVERE: Failed Converting to .csv format e : C:\Users\test\Desktop\CMBS INFO FILES\Mukund Mail Files\santosh files\lsOct09\AMRESCO1997C1_delinqReport0910.xls Count => 1
java.lang.NullPointerException
at com.bloomberg.mtge.cmbs.roll.util.ExcelToCsvConver ter.convertBySheetTypeMultipleTCS(ExcelToCsvConver ter.java:641)
at com.bloomberg.mtge.cmbs.roll.util.ExcelToCsvConver ter.main(ExcelToCsvConverter.java:967)".
*****************
When i tried to debug, i found that
HSSFWorkbook wb = null;
POIFSFileSystem fs = null;
try
{
fs = new POIFSFileSystem(new FileInputStream(excelFile));
wb = new HSSFWorkbook(fs);
}
catch(Exception e)
{
e.printStackTrace();
}
wb in the try block was null and an exception was throw like Null pointer exception.
But when i opened the file and saved the file(without any changes) the size of excel file got reduced, and when i run my application the csv file was generated with out any error...
I have 100+ files which are giving this problems....
So i canot manually try to open and save...
Pls help me...Thanks in Adance....
Vamshi
- 10-30-2009, 11:55 AM #3
Member
- Join Date
- Oct 2009
- Posts
- 3
- Rep Power
- 0
org.apache.poi.poifs.filesystem.OfficeXmlFileExcep tion:
Hi All,
I have developed a Core Java application for converting excel to csv files(in Eclipse galileo) using poi3.5beta2.jar. I'm able to covert excel to csv.
Note: The excel files i am processing are 97-2003 version files.
**************
Yesterday when i was executing a excel file, I got
"
org.apache.poi.poifs.filesystem.OfficeXmlFileExcep tion: The supplied data appears to be in the Office 2007+ XML. You are calling the part of POI that deals with OLE2 Office Documents. You need to call a different part of POI to process this data (eg XSSF instead of HSSF)
at org.apache.poi.poifs.storage.HeaderBlockReader.<in it>(HeaderBlockReader.java:111)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.<i nit>(POIFSFileSystem.java:151)
at com.bloomberg.mtge.cmbs.roll.util.ExcelToCsvConver ter.convertBySheetTypeMultipleTCS(ExcelToCsvConver ter.java:633)
at com.bloomberg.mtge.cmbs.roll.util.ExcelToCsvConver ter.main(ExcelToCsvConverter.java:967)
30 Oct, 2009 4:37:32 PM com.bloomberg.mtge.cmbs.roll.util.ExcelToCsvConver ter convertBySheetTypeMultipleTCS
SEVERE: Failed Converting to .csv format e : C:\cmbs\runscript\temp\santosh\santoshInput\lsOct0 9\BACM2001PB1_servicerReport0910.xls Count => 1
java.lang.NullPointerException
at com.bloomberg.mtge.cmbs.roll.util.ExcelToCsvConver ter.convertBySheetTypeMultipleTCS(ExcelToCsvConver ter.java:641)
at com.bloomberg.mtge.cmbs.roll.util.ExcelToCsvConver ter.main(ExcelToCsvConverter.java:967)
".
*****************
When i tried to debug, i found that
HSSFWorkbook wb = null;
POIFSFileSystem fs = null;
try
{
fs = new POIFSFileSystem(new FileInputStream(excelFile));
wb = new HSSFWorkbook(fs);
}
catch(Exception e)
{
e.printStackTrace();
}
wb in the try block was null and an exception was throw like Null pointer exception.
But when i opened the file and saved the file(without any changes) the size of excel file got reduced, and when i run my application the csv file was generated with out any error...
I have 100+ files which are giving this problems....
So i canot manually try to open and save...
Pls help me...Thanks in Adance....
Vamshi
Similar Threads
-
java.lang.NoSuchMethodError: org.apache.log4j.Logger.log(Ljava/lang/String;Lorg/apach
By rameshraj in forum JDBCReplies: 5Last Post: 03-17-2011, 02:26 PM -
java.lang.RuntimeException: No application id has been found
By pradeepsetty in forum EclipseReplies: 0Last Post: 07-06-2009, 02:38 PM -
JFileCjooser--java.lang.RuntimeException: java.io.IOException: Could not get shell fo
By Manfizy in forum New To JavaReplies: 4Last Post: 06-24-2009, 06:34 AM -
java.lang.RuntimeException+ Axis
By Peter in forum Advanced JavaReplies: 1Last Post: 07-05-2007, 01:43 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks