Skip to Content
0
Dec 01, 2006 at 11:41 AM

Reading an Excel document from KM

29 Views

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