IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  How to create XLS sheet in webMethod

    Posted Thu November 10, 2011 06:31 AM

    Hi All,
    I need to develop a service to create xls sheet. Can anyone help me how to create excel sheet or if there is any java based API for xls in webMethod? I am using webMethod 6.1 version.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: How to create XLS sheet in webMethod

    Posted Thu November 10, 2011 02:21 PM

    Hi,

    You can use the java API for creating xls sheet.
    Just paste the jar file in your package name folders\code\jars

    Here is a sample:

    File file = new File(“replicate/salvage/Packages_in_48036dd.xls”);
    //file.createNewFile();
    WritableWorkbook writableWorkbook = Workbook.createWorkbook(file);
    WritableSheet writableSheet = writableWorkbook.createSheet(“packages”, 0);
    Label label = new Label(0,0,“Package Names”);
    writableSheet.addCell(label);
    // writableWorkbook.write();

                 Label temp;
    for(int i=1;i<fileList.length;i++)
    {
    int j=0;
    temp=new Label(0,i,fileList[i-1]);
    writableSheet.addCell(temp);
    // writableWorkbook.write();
    j++;
    }
    writableWorkbook.write();		
    writableWorkbook.close();
    

    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 3.  RE: How to create XLS sheet in webMethod

    Posted Thu November 10, 2011 04:37 PM

    A simple GOOG search lead me to “POI-HSSF and POI-XSSF/SXSSF - Java API To Access Microsoft Excel Format Files”. By the way, why do you still use the 6.1? Does SAG still support it?


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 4.  RE: How to create XLS sheet in webMethod

    Posted Sun November 13, 2011 06:59 AM