Hello, I just started looking at POI this morning. On http://poi.apache.org/spreadsheet/how-to.html under "Reading or modifying an existing file", there is a link to sample code: http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/HSSFReadWrite.java
No matter what Excel file I try, I get
java.lang.NullPointerException
at com.caci.dms.excel.HSSFReadWrite.main(HSSFReadWrite.java:162)
I've attached one of the failing spreadsheets - a very simple example.
The program output is included below.
I'm using Excel 2003 on Win XP sp2
poi 3.6
Any idea what is going wrong?
Thank you.
Chris
<OUTPUT>
Data dump:
Sheet 0 "Sheet1" has 17 row(s).
java.lang.NullPointerException
ROW 0 has 1 cell(s).
CELL col=0 VALUE=NUMERIC value=1.0
ROW 1 has 1 cell(s).
CELL col=0 VALUE=NUMERIC value=2.0
ROW 2 has 1 cell(s).
CELL col=0 VALUE=NUMERIC value=3.0
ROW 3 has 1 cell(s).
CELL col=0 VALUE=NUMERIC value=4.0
ROW 4 has 1 cell(s).
CELL col=0 VALUE=NUMERIC value=5.0
ROW 5 has 1 cell(s).
CELL col=0 VALUE=NUMERIC value=6.0
ROW 6 has 1 cell(s).
at com.caci.dms.excel.HSSFReadWrite.main(HSSFReadWrite.java:162)
</OUTPUT>
--
http://chrisdowney.name/
chris.xls
Description: MS-Excel spreadsheet
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
