cancel
Showing results for 
Search instead for 
Did you mean: 

java mapping for reading excel

Former Member
0 Kudos

Hi All

I have requirement of reading excel file ,i chose the option of using the java mapping for the same

i built a java code using jxl.jar its working perfect when i run it in NWDS.

But when i upload it in PI as imported archive and run it in operation mapping intially it was throwing linkage error  failed to load the class

but  after loading the  jxl.jar as one more imported archive, the error is resolved

but when i run the mapping it get executed succesfully but the xml is not getting built

Please correct me if i am wrong , the excel data which comes as stream data (looks like junk) will be executed through java mapping right.

or is there anything else which i need to do?

Regards

Sandeep

Accepted Solutions (1)

Accepted Solutions (1)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Sandeep,

                    your questions

1. The excel data which comes as stream data (looks like junk) will be executed through java mapping right?

ans)  If java mapping is the first mapping in the scenario (and you are not using FCC ) then yes your assumption is correct.

2.  is there anything else which i need to do?

Ans)  You wrote that in NWDS java mapping is producing result but not in PI. Now you need to add trace statement in your mapping and check the trace after exceution od each step. Test the mapping using the method described in this wonderful blog by Praveen Gujjeti. ( One small request , in case you find this blog helpful please kindly, if possible, rate the blog). Please check taget XSD properly to see if its meets  xml structure as produced by java mapping.

Hope this resolves the problem.

Regards

Anupam

Former Member
0 Kudos

HI Anupam

The things are loaded fine but

 

Workbook w = Workbook.getWorkbook(iStream); this particular line of code is throwing exception.

I am  not sure why it is throwing exception but it is working fine in eclipse.

Regards

Sandeep

anupam_ghosh2
Active Contributor
0 Kudos

Hi Sandeep,

                    The input excel sheet in eclipse and to the PI server are same or different?

What is the version of the Excel you are using? Older version of jxl.jar will work only for Excel 97 version.  I feel this exception can be avoided with correct version of jxl.jar as required by PI server java version.

Regards

Anupam

Answers (2)

Answers (2)

rajasekhar_reddy14
Active Contributor
0 Kudos

I concur with Anupam replay. Why dont you deal using adapter module instead of java mapping?any specific reason behind this?

former_member184789
Active Contributor