• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Error in POI

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 22806
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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()
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic