This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 19649
    
  18

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
 
Don't get me started about those stupid light bulbs.
 
subject: Error in POI
 
Similar Threads
Converting a Word doc into a Gui.
XML to Excel format
Excel .xls or .xlsx interaction with IO program
Using poi jar 2.5 - java.io.IOException: unable to read entire block.
hashtable