gudii9
asked on
HSSFWorkbook cannot be resolved error
Hi,
I am gerring below error
Multiple markers at this line
- HSSFWorkbook cannot be resolved
to a type
- HSSFWorkbook cannot be resolved
to a type
i downloaded below jars
https://poi.apache.org/download.html
Binary Distribution#
poi-bin-3.16-beta1-2016112 0.tar.gz (18.64 MB, signature (.asc))
MD5 checksum: 53eb92ff0bd7a65b7f22b2b2dc 1d98f1
SHA1 checksum: 41454518a91b3f30aff2c14806 0ca675378b 71e6
poi-bin-3.16-beta1-2016112 0.zip (26.92 MB, signature (.asc))
MD5 checksum: 72d32ef7d53eb8bf041cbdcbca 6e3f0d
SHA1 checksum: 8d85b48f8ff150689b90cd6f1f 92dbdcdfd2 3a35
and included in the build path from eclipse. all other errors goe except this one.
I am trying a Apache poi sample project.
how to generally know under which jar HSSFWorkbook class resides in?
please advise
I am gerring below error
Multiple markers at this line
- HSSFWorkbook cannot be resolved
to a type
- HSSFWorkbook cannot be resolved
to a type
i downloaded below jars
https://poi.apache.org/download.html
Binary Distribution#
poi-bin-3.16-beta1-2016112
MD5 checksum: 53eb92ff0bd7a65b7f22b2b2dc
SHA1 checksum: 41454518a91b3f30aff2c14806
poi-bin-3.16-beta1-2016112
MD5 checksum: 72d32ef7d53eb8bf041cbdcbca
SHA1 checksum: 8d85b48f8ff150689b90cd6f1f
and included in the build path from eclipse. all other errors goe except this one.
I am trying a Apache poi sample project.
how to generally know under which jar HSSFWorkbook class resides in?
please advise
ASKER
import org.apache.poi.hssf.usermo del.HSSFSh eet;
import org.apache.poi.hssf.usermo del.HSSFWo rkbook;
above two resolved.
below two still show error
import org.apache.poi.ss.usermode l.Cell;
import org.apache.poi.ss.usermode l.Row;
import org.apache.poi.hssf.usermo
above two resolved.
below two still show error
import org.apache.poi.ss.usermode
import org.apache.poi.ss.usermode
ASKER
when i search as below in google
import org.apache.poi.hssf.usermo del.HSSFSh eet; jar
it pointed in java2s as attached
poi.png
import org.apache.poi.hssf.usermo
it pointed in java2s as attached
poi.png
ASKER
i saw
poi2.png
poi2.png
ASKER
below jars i have to include not sure which are extra
poi3.png
poi3.png
ASKER
getting below err
java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSoc ketImpl.co nnect0(Nat ive Method)
at java.net.DualStackPlainSoc ketImpl.so cketConnec t(Unknown Source)
at java.net.AbstractPlainSock etImpl.doC onnect(Unk nown Source)
at java.net.AbstractPlainSock etImpl.con nectToAddr ess(Unknow n Source)
at java.net.AbstractPlainSock etImpl.con nect(Unkno wn Source)
at java.net.PlainSocketImpl.c onnect(Unk nown Source)
at java.net.SocksSocketImpl.c onnect(Unk nown Source)
at java.net.Socket.connect(Un known Source)
at java.net.Socket.connect(Un known Source)
at sun.net.NetworkClient.doCo nnect(Unkn own Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.company.UnzipUtility.d ownloadAnd Unzip(Unzi pUtility.j ava:51)
at com.company.Main.main(Main .java:19)
java.net.ConnectException:
at java.net.DualStackPlainSoc
at java.net.DualStackPlainSoc
at java.net.AbstractPlainSock
at java.net.AbstractPlainSock
at java.net.AbstractPlainSock
at java.net.PlainSocketImpl.c
at java.net.SocksSocketImpl.c
at java.net.Socket.connect(Un
at java.net.Socket.connect(Un
at sun.net.NetworkClient.doCo
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.company.UnzipUtility.d
at com.company.Main.main(Main
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
The above error is at line number 51. can you show the code what you are trying to do? I think the URL is incorrect. your POI issues are resolved and you are facing a different issue.
The above error is at line number 51. can you show the code what you are trying to do? I think the URL is incorrect. your POI issues are resolved and you are facing a different issue.
at com.company.UnzipUtility.downloadAndUnzip(UnzipUtility.java:51)
ASKER
i tried from my home machine
all i needed was below jar. all othersnot needed looks like
http://www.java2s.com/Code/Jar/p/Downloadpoi35FINALjar.htm
java.io.IOException: Server returned HTTP response code: 403 for URL: http://www.nseindia.com/content/historical/EQUITIES/2015/JUL/cm17JUL2015bhav.csv.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.company.UnzipUtility.d ownloadAnd Unzip(Unzi pUtility.j ava:51)
at com.company.Main.main(Main .java:19)
all i needed was below jar. all othersnot needed looks like
http://www.java2s.com/Code/Jar/p/Downloadpoi35FINALjar.htm
java.io.IOException: Server returned HTTP response code: 403 for URL: http://www.nseindia.com/content/historical/EQUITIES/2015/JUL/cm17JUL2015bhav.csv.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.company.UnzipUtility.d
at com.company.Main.main(Main
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
checking above jar