It's not a secret anymore!*
The moose likes Other Open Source Projects and the fly likes Error  while  reading Excel file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Error  while  reading Excel file." Watch "Error  while  reading Excel file." New topic
Author

Error while reading Excel file.

Slaxmi Raj
Ranch Hand

Joined: Apr 20, 2012
Posts: 45
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
Bartender

Joined: May 31, 2011
Posts: 1776
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

Joined: Apr 20, 2012
Posts: 45
Thank you for your reply..
please tell me what are the jar files i have to add.
thank you.
John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error while reading Excel file.