• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while reading Excel file.

 
Slaxmi Raj
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • 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

 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic