cancel
Showing results for 
Search instead for 
Did you mean: 

Adapter Module for Excel to XML

Former Member
0 Kudos

Hi,

Im developing a module for file adapter for converting excel to xml. Once i get the payload, i extract the excel data using ByteInputStream. Then, i m trying to read the excel file usinf jexcel and jxl API provided for reading excel file.

The following is the snippet of the code:

obj = inputModule.getPrincipalData();

msg = (Message) obj;

XMLPayload xmlpayload = msg.getDocument();

byte by[] = convert(xmlpayload.getContent());

In the convert() function...

xmlData is wht the convert() function is passing.

ByteArrayInputStream ba = new

ByteArrayInputStream(xmlData);

Workbook wb = Workbook.getWorkbook(ba);

But i get the following exception in the Workbook... statement

jxl.read.biff.BiffException: Unable to recognize OLE stream

Please help...i'm not able to figure wht is wrong with the code.

Thanks n Regards

Akshay

Accepted Solutions (0)

Answers (1)

Answers (1)

moorthy
Active Contributor
0 Kudos

Hi,

Following blog may help you in figuring out the error.

/people/sap.user72/blog/2005/07/04/read-excel-instead-of-xml-through-fileadapter

Hope this helps

Regards,

Moorthy