on 05-31-2013 12:55 PM
Hi,
I am using NWDS 7.0. I always get error in this line of code
HSSFWorkbook wb=new HSSFWorkbook();
Whenever I have to read/write an excel file I have to use this particular line. But I always get error in this line and i am not able to move further.
I have added poi 3.2 jar to java build path as external jar. I have also copied and pasted it in lib folder in navigator tab of my dc. But still i get the error.
Do any of you have idea on this?
Regards
Janani Anandan
Hi Janani,
you are using poi 3.2 jar which is an external jar. The Jar and java API inside the jar is made available to you in the designtime in the NWDS but the same are not available to your application as the jar did not go to the SERVER, it was sitting on your desktop filesystem all the time.
So even though it got the jar in the designtime, it did not get the jar in the runtime.
You need to make a lib DC and reference that lib DC from your WebDynpro Project to make that external jar available to your application at run time.
The following should help you -
some more info
http://help.sap.com/saphelp_nw70/helpdata/en/46/3ce3e4df201d63e10000000a11466f/content.htm
http://help.sap.com/saphelp_nw70/helpdata/en/5a/2e2f4234135433e10000000a155106/content.htm
Thanks and Regards,
-Amol Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
search in SCN regarding how to use external lib
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Janani,
Please look at this code:
IWDResource resource = // Your Resource
InputStream inputStream = resource.read(true);
HSSFWorkbook workBook = new HSSFWorkbook(inputStream);
Hope this helps!!
Regards
Vijay Kumar Kalluri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.