File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes Error in POI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Error in POI" Watch "Error in POI" New topic
Author

Error in POI

nick sharma
Greenhorn

Joined: May 05, 2008
Posts: 28
Hi
I used the Apache POI to access excel files.The example file given at the location
POI example
It contains the following lines of code which are generating a error


The error generated is that the above method does not exist in the package
org.apache.poi.hssf.usermodel.HSSFSheet

i have imported all the classes mentioned in the program and followed everything that was required by setting classpath to the jar files downloaded from the Apache site.

How do i solve the above problem.

Thank you
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19759
    
  20

Call a different method: that method simply does NOT exist in the API. Where did you get it from??
Try getRow or createRow - those are the only ones that return a HSSFRow.

The only methods that start with "getPhysical" are the following:
org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate#getPhysicalNumberOfCells()
org.apache.poi.hssf.usermodel.HSSFRow#getPhysicalNumberOfCells()
org.apache.poi.hssf.record.aggregates.RowRecordsAggregate#getPhysicalNumberOfRows()
org.apache.poi.hssf.usermodel.HSSFSheet#getPhysicalNumberOfRows()


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error in POI