Hi,

I am trying to start working with poi and began by copy some code from (
http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/HSSFReadWrite.java
)

In my build I have tried this code with POI version 3.6 and 3.5-FINAL.


I wrote a very small java class with a main method that takes an argument of
the workbook to work with. Then I try to run this code:

HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(fileName));

System.out.println("Data dump:\n");
 System.out.println("number of worksheets: " + wb.getNumberOfSheets());
HSSFSheet sheet = wb.getSheetAt(0);
 int rows = sheet.getPhysicalNumberOfRows();
System.out.println("number of rows: " + rows);

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/poi/hssf/usermodel/HSSFWorkbook
Caused by: java.lang.ClassNotFoundException:
org.apache.poi.hssf.usermodel.HSSFWorkbook


Is this a bad example to follow? Any recommendations for pages to look at? I
want to read certain data from a workbook and then write out to a new csv
file.

Thanks,
Barry

Reply via email to