Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error in POI

 
nick sharma
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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()
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic