webMethods

webMethods

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
Expand all | Collapse all

ApplinX tables to Excel

  • 1.  ApplinX tables to Excel

    Posted Wed December 19, 2007 02:28 PM

    On a jsp page, I have a link to send the data to excel. I utilized the example in Sabrafoods and, of course, enlarged the scope by accumulating single occurrence fields and specialized headers. Now, all of this works fine, but there is one anomoly that I cannot seem to eliminate. The bottom row of the Applinx table that is displayed in the final Excel file is a blank row that has the “Merge & Center” function activated. I cannot see where this is implemented, but it prevents any summarization in any column. When you delete this row, all summarizations now work correctly. This answer, naturally, is unacceptable to our users and they want it eliminated before the excel file is displayed. Do you have any quick answers or suggestions on this matter? As always, I appreciate your efforts in assisting me. I have attached some sample files for you.

    Thanks,

    Joe Ayres
    Blk2_excel.zip (5.69 KB)


    #Mainframe-Integration
    #webMethods
    #ApplinX


  • 2.  RE: ApplinX tables to Excel

    Posted Wed December 19, 2007 04:16 PM

    Hi Joe,
    I’m trying to understand what exactly the problem is.
    What do you meant by “merge & center” function?
    Meanwhile can you comment the part that export the page to excel (“getResponse().addHeader…”) and then send me the html you will get? Also send me an example of the excel file so we can understand better what is the happened.
    Thanks,
    Asaf


    #webMethods
    #Mainframe-Integration
    #ApplinX


  • 3.  RE: ApplinX tables to Excel

    Posted Wed December 19, 2007 04:40 PM

    Hello Asaf,

    I have attached the examples you requested. The “Merge & Center” function in Excel is on the toolbar. In my samples, line 50 of the spreadsheet is the row I am referring to. It is blank, but when open in excel, the “Merge & Center” button in the toolbar is highlighted, indicating that this is active for this row. I have never used it so I am unsure what it is for in this instance. I also don’t know where it gets set in this process. Let me know if I can clarify it any further.

    Thanks,

    Joe

    P.S. Actually, I was looking at this further and I see that the “Merge & Center” function is on for the entire spreadsheet, not just the blank row at the bottom.
    Blk2_Excel_Test_files.zip (15.4 KB)


    #Mainframe-Integration
    #webMethods
    #ApplinX


  • 4.  RE: ApplinX tables to Excel

    Posted Thu December 20, 2007 03:06 PM

    Hi Joe,
    We looked at the files you sent us and this is our conclusions:

    1. Here it seems that the “Merge & center” function is not on the entire spreadsheet, but only on the cells that are composed of more then one cell. This is the default behavior for this kind of cells ( in HTML)
    2. We took your code and try the same on our SabraFood application but we didn

    #Mainframe-Integration
    #webMethods
    #ApplinX


  • 5.  RE: ApplinX tables to Excel

    Posted Fri December 21, 2007 02:10 PM

    Sure, here they are in a zipped file. Now, I have identified that the blank line appearing below the table is the following code in the Blk2_Excel_Test_htm file:

    If you could also help me to understand why this is generated, maybe we can then resolve this problem. If it was not there, then our user problem of performing Sum on columns would be allieviated.

    Thanks,

    Joe
    Excel.zip (254 KB)


    #ApplinX
    #webMethods
    #Mainframe-Integration


  • 6.  RE: ApplinX tables to Excel

    Posted Sun December 23, 2007 12:40 PM

    Hi Joe,
    I got your zip file, but it seems that the GCT is corrupted.
    Did you managed to work with it? When working with the GXZ you sent me and the GCT on APX_521_005 I got the first screen ‘NetPass1’ and the second screen ‘CICS2’ but afterwards all the screen were empty. The GCT is important since I want to debug the code here, and I need the relevant screens & table to be available in the GCT.
    Waiting for you replay,
    Asaf


    #ApplinX
    #webMethods
    #Mainframe-Integration


  • 7.  RE: ApplinX tables to Excel

    Posted Mon December 24, 2007 04:31 PM

    Hi Asaf,

    I have attached a new file for you. Let me know if it works.

    Joe
    Dec24_excel.zip (20.9 KB)


    #ApplinX
    #webMethods
    #Mainframe-Integration


  • 8.  RE: ApplinX tables to Excel

    Posted Tue December 25, 2007 12:44 PM

    Hi,
    In 19.12 you sent me a zip file containing file called


    #webMethods
    #Mainframe-Integration
    #ApplinX


  • 9.  RE: ApplinX tables to Excel

    Posted Wed December 26, 2007 01:48 PM

    Hi Asaf,

    I did follow your instructions: (
    Dec26_Excel.zip (20.9 KB)


    #webMethods
    #Mainframe-Integration
    #ApplinX


  • 10.  RE: ApplinX tables to Excel

    Posted Wed December 26, 2007 07:29 PM

    Asaf,

    I made some corrections to a Service and created the attached GCT. Maybe this will work for you.

    Joe
    Dec21g_excel.zip (18.3 KB)


    #Mainframe-Integration
    #webMethods
    #ApplinX


  • 11.  RE: ApplinX tables to Excel

    Posted Thu December 27, 2007 08:58 AM

    Hi Joe,
    It seems that I misled you.
    Please generate a new HTML file using these instructions:
    Please comment this part in your java file (blk2_excel.java):

    getResponse().reset();
    getResponse().setContentType(“application/vnd.ms-excel”);
    getResponse().addHeader(“Content-Disposition”,“attachment; filename="” + gx_table.getName() + “.xls"”);

    Now, after pressing the excel link you will get HTML page. Please send me this page and the view source of this page.
    The GCT is still not working well, we are looking into this issue also, but we if you can I want you to record the file in this way:
    Go to the application properties (in the admin) → host tab → trace file section and check the


    #webMethods
    #Mainframe-Integration
    #ApplinX


  • 12.  RE: ApplinX tables to Excel

    Posted Thu December 27, 2007 01:22 PM

    Hi Asaf,

    Here are the files you asked for. I believe they are correct, but let me know if they need tweaking.

    Thanks,

    Joe
    excel_problem.zip (48.9 KB)


    #webMethods
    #Mainframe-Integration
    #ApplinX


  • 13.  RE: ApplinX tables to Excel

    Posted Thu December 27, 2007 03:20 PM

    Hi,
    Thanks for the files, All of them are working great and are exactly what I wanted.
    We saw the cause for the blank line (in the HTML).
    We will work to fix it and I will update you as soon as possible (but only after this weekend)
    Thanks for the information and the quick replays.
    Regards,
    Asaf


    #Mainframe-Integration
    #webMethods
    #ApplinX


  • 14.  RE: ApplinX tables to Excel

    Posted Sun December 30, 2007 10:19 AM

    Hi again Joe,
    The cause of the blank line is hidden field which is generated because of the XSL file.
    Attached here is new XSL file, try to use it to solve your problem.
    Let me know if the new file worked for you.
    Happy New Year,
    Asaf
    hosttable.xsl (1.22 KB)


    #Mainframe-Integration
    #ApplinX
    #webMethods


  • 15.  RE: ApplinX tables to Excel

    Posted Mon December 31, 2007 05:27 PM

    Hi Asaf,

    Happy Holidays to you and all at Sabratec (Software AG). The hostTable.xsl file was exactly what we needed. It works perfectly. Thanks for your assistance, and as always, I greatly appreciate your time and effort.

    Regards,

    Joe


    #ApplinX
    #Mainframe-Integration
    #webMethods


  • 16.  RE: ApplinX tables to Excel

    Posted Tue January 01, 2008 09:19 AM

    Thank you very much,
    Happy holidays to you too.
    Asaf and all SoftwareAG Israel (Sabratec)


    #Mainframe-Integration
    #ApplinX
    #webMethods