• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Error while reading Excel file.

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai , i am trying to read excel file ,but getting compilation error when passing file path.please any one help how to reduce the error.
Error:

Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The constructor XSSFWorkbook(FileInputStream) is undefined


 
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error indicates that there is no constructor in the class XSSFWorkbook class that takes a FileInputStream argument. If you are using this XSSFWorkbook class, then from its API you can see a constructor that takes a java.io.InputStream and hence you should receive no error.

The reason might be you are using an older version of the jar file which contains XSSFWorkbook class.
 
Slaxmi Raj
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your reply..
please tell me what are the jar files i have to add.
thank you.
 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know about Apache POI jars. Please check in the internet or download from Apache POI website.

Moving thread to Open Source forum.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic