I am Rani and Joined newly to Wmuser group. I need the following information on webMethods
We have a requirement to convert excel file to App schema (WM record structure). Can any one give me some inputs on if this is possible in webMethods through any of the existing services or any procedure to do the same.
Thanks a prior. Waiting for quick response as it is a critical requirement.
Search the forums and the software section for “Excel”. You’ll find a few posts and an example. Basically, you use an open-source library, such as POI, to read the Excel file and create an IS document from it.
I forgot to ask–do you mean an Excel file or a CSV file (which many seem to refer to as an “Excel file”)? There is a big difference in how these are handled.
The jar file is available in the [URL]http://jexcelapi.sourceforge.net/[/URL] in this link. go to Files in the top, it will take you the page where u can download.
put this jar in packages\YourCustompackage\code\jars\static\jxl.jar
(create a folder static inside this jar and place the file inside static folder)
After placing the jars you need to restart the Integration Server.
create a flow service and give the input of that service as contentStream(object type) and then call http.transportInfo service and extract the excel.
I will make my requirement bit clear.Right now am able to create an Schema in webMethods if my input is in XML(i.e.in XSD format).where as my input should be in proper excel/csv.I need the the procedure in java/flow(feasible with webMethods) so that my problem will solved easily.
An Excel file (.xls, .xlsx) is not the same thing as a CSV. The two will be handled quite differently.
If you need to process an .xls/.xlsx file, the open source libraries above can be used to read the data. If you intend to translate that to an IS document, then you’ll use the IS Java API IData interface to create to do.
If you need to process a CSV then you can use the flat file facilities–create a flat file schema and use the flat file services to convert the records to IS documents. Refer to the Flat File Schema Developer’s Guide for details.
I have found the open-source library POI, but howdo I install it?
The package returns the error:
Load ErrorsNameReasonEXCEL_contentHandler.util:MSExcelWorkSheetToRecordjava.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbookEXCEL_contentHandler.util:createExcelRecordjava.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbookEXCEL_contentHandler.util:MSExcelDocumentToRecordjava.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook