on 12-01-2006 11:41 AM
Hi,
I am trying to read an Excel doc from KM.
I am using following code to get the inputStream of the excel file....
<i><b>IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
IUser sapUser = wdClientUser.getSAPUser();
com.sapportals.portal.security.usermanagement.IUser ep5User =
WPUMFactory.getUserFactory().getEP5User(sapUser);
IResourceContext resourseContext = new ResourceContext(ep5User);
IResourceFactory resourseFactory = ResourceFactory.getInstance();
RID pathRID = RID.getRID("/documents/George/SystemFile.xls");
IResource resource =
(IResource) resourseFactory.getResource(
pathRID,
resourseContext);
InputStream in = resource.getContent().getInputStream();</b></i>
Then i try using this code to open excel
<i>
<b>workbook = Workbook.getWorkbook(in);</b></i>
This is where i get my error!!!!
<b>java.lang.NoClassDefFoundError: jxl/read/biff/BiffException</b>
I have got the fileInputStream printed out and its giving me a value.
But when i try <i>
<b>workbook = Workbook.getWorkbook(in);</b></i>, i get exception.
I have included excel.jar for this.
Any ideas, welcome
Thanks in Advance
BP
Hi,
Put the excel.jar file under the lib directory in your WD project, deploy and run application.
Omri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello BP,
Are you using a DTR for creating/deploying your application?
In that case, you will need to create a library project and expose excel.jar file as a public part. If you are not using DTR, you will need to copy excel.jar file in lib folder of the project.
Regards,
Ashutosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.