Hello , this is my first post in this forum. I’ve been experimenting webMethods for a few weeks dealing with JSON and XML, but when it comes to XLS files I couldn’t figure out how to work with. Reading this forum I came across many solutions but none of them worked for me.
The first one I tried was using the EXCEL_contentHandler and copying the necessary jar files into the specified folder. Then using the services included in the zip file all I could get from a XLS file was a XML file with the headers only.
Secondly, I tried the JExcelAPI solution but it did not work for me.
I don’t know what I am doing wrong or if it’s the case these solutions are outdated because they were given in 2011 or even before that.
I appreciate any help given and thanks in advance!
Without knowing exactly what went wrong nobody will be able to help. But according to my knowledge, the IS does not offer any means to handle Excel files. You should write java services to process them. In the java service, you can use a library of your choice to process Excel files. There are some of them, with different capabilities. So the one to choose depends on your needs. Just copy it to the code/jars folder in the IS package, and you’ll be able to use it.
I’d say you’ll get more help in the forums about those libraries, since the topic is really not webMethods related.
I’m trying to read a XLS file with one or two columns for the sake of practice, I’m still not sure for what purpose I’m going to use it on my compani other than I need to be able to handle XLS. So I lack a lot of information as well, but for now I want to handle a couple of columns.
I followed other topics instructions in this forum and they didn’t work. I’m not familiar with Java to write a Java Service, I asked a coleague for assistance and we could manage to use the apache POI to read XLS files using Eclipse, but when we tried to do the same with webMethods (designer) it didn’t work. If I can manage to make it work I’ll post the results here.
using the Apache POI Jar should be possible in Designer but you will have to place in the right place.
It should be place under code/jars folder of directory in which you will implement the java wrapper services to use this API.
Remember to reload the the package after placing it there to get it loaded into IS Java memory.
When developing on a remote IS you can savely ignore the errors in Designer JavaService Development Editor as the service will be compiled on the remote IS where the lib is known.
If possible, you might want to consider converting the xls to a csv file, which then can be handled as a FlatFile structured document.
See FlatFile Development Help for further information.
Hello everyone, I’ve been working around with java services and POI4 and I could read a xls file and return a JSON string. If anyone is interested here’s the github repo:
it’s not a handler but only a reader. I wanna keep working on it to be able to do the opposite, read a JSONstring to a xls file and deal with xlsx files as well.