XML to XLS

Hi Experts,

would know a service on webMethods that can convert an XML input to XLS file.
an example of service please.

Thank you in advance.
Regards,

Hi,

there is no such service ootb.

you can create on of your own by writing java service wrapper for an public office API like Apache POI.

Also check the community as there are currently other threads ongoing discussing the same thing.
When creating a CSV file is sufficient you can check for the Flat-File feature.

Regards,
Holger

In addition to the above details already provided, can you share the sample xml input and your expected XLS file, can try with some pointers on java service.

Hello Mahesh K. Sreenivas

for the sample file I want to have it as xls file:
Sup Order_Number Line Created_Date_UTC Quantity Req_Ex_Works_Order
ibf 0003660866 DLO GV 30 1045412

I was able to do it with an XLST service but I wanted to have a java service too, but I’m not good at java.
exemple.xml (354 Bytes)

Hi,

just one question:
When there is a working solution by using XSLT (can be integrated into webMethods services by using the WmXSLT package), why bothering with creating complex Java services by using external API?

Regards,
Holger

Don’t Reinvent The Wheel!

On your request, you can refer the below java code for creating the XLS from IData, covert the xml to IS Document and use this service.

http://techcommunity.softwareag.com/pwiki/-/wiki/Main/Java%20Service%20to%20convert%20StringList%20and%20DocList%20to%20XLS%20-%20ToExcel%20Utility

Any questions?

Hello Mahesh K. Sreenivas

Thank you very much.

But when i run the demo , i have this error:

java.lang.reflect.InvocationTargetException:org/apache/poi/hssf/usermodel/HSSFWorkbook

I has been tested on IS 9.7 with JDK 1.7

Thank

Regards

Might be the POI jar compatibility issue with JDK (as per the details, but not sure unless I test it myself), can you download jar as per your JDK version and note that I do not have 9.7 IS installation setup currently to test, the code posted on the forum was tested on IS 10.4 with JDK 1.8.

POI 4.0 and later require JDK version 1.8 or later.

POI 3.11 and later 3.x versions require JDK version 1.6 or later.

POI 3.5 to 3.10 required the JDK version 1.5 or later. Versions prior to 3.5 required JDK 1.4+.

For more quesitons, feel free to write me an email.

Hi,

as wM 9.7 is running on Java 7 by default (not sure if it is already using Java 8), POI 3.11+ should be fine.

Regards,
Holger