How to Show excel in my app?

I see a demo in my server with url :  http://hdkj:50000/webdynpro/dispatcher/sap.com/bialvtestapps/ALVTestWithExternalDialog
I select Excel Inplace Allowed and start it ,then it has a menu with names Ms Excel,and it can show data with exccel.
(If those demo hava resource code?)
1.I know how to get data from context, but I don't know how to show excel dynamic(I kown how to show excel local)....
2.And There has a table is used for config table ,such as which column will be show. How can do it?
Anyone can help me? (Can Visual Composer implement it ? OR Alv?  I Don't Know about it)
Thanks very much!
Edited by: fun HOW on Apr 23, 2008 8:05 AM

Thanks for you answer.
I know how to create a xml file with Tpye IWDResource and use download() method to download that file.
But I want show it with a OfficeControl in a view . I read a xml file local then transform to byte[] and binding with OfficeControl . But it's does not work.
Then I used a Third Tool names POI,it can create a Excel file. I transform it to byte[] and binding with OfficeControl,it's does not work .And it has a error:
ERRO|20080424100407|KHFA.OfficeCompView.OfficeControl_5140|CIOS_GeneralDocumentContainer_Acf::|OleLoad|HRESULT=-2147221164(没有注册类别)
I do't know why?
Code:
          ByteArrayOutputStream os = new ByteArrayOutputStream();
          HSSFWorkbook wb = null;
          wb = new HSSFWorkbook();
          HSSFSheet s = wb.createSheet();
          wb.setSheetName(0, "Matrix");
          HSSFRow row = s.createRow(0);
          HSSFCell cell = row.createCell((short) 0);
          cell.setCellValue("POI test");
          try {
               wb.write(os);
          } catch (IOException e) {
               e.printStackTrace();
          try {
               ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());
               IWDResource resource = WDResourceFactory.createCachedResource(os
                         .toByteArray(), "1", WDWebResourceType.XLS);
               wdContext.currentContextElement().setResource(resource);
               INodeBinaryElement element = wdContext.nodeNodeBinary().createAndAddNodeBinaryElement();
               element.setBinaryResource(os.toByteArray());
          } catch (Exception e) {
               e.printStackTrace();

Similar Messages

  • How to show custom error message in WebADI Excel template?

    Hi,
    I've  created a custom Web ADI integrator and associated it with a 'Procedure' based custom interface.
    WebADI Interface API Returns is set to  "Error Message".
    I'm using  raise_application_error(-20001, "Actual Error Message") for invalid rows,but custom error message from PL/SQL  is not populated on the excel template.
    Instead it is showing "SQL exception occurred during PL/SQL upload".
    Am I missing anything? How to show custom error message from Pl/SQL procedure to WebADI Excel template?
    TIA
    Narasimha

    The custom API errors are visible in the BNE log but not on the Excel.
    BNE Log=>
    12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR          BnePLSQLUpload.doUpload: Exception while uploading to PL/SQL API.  Error Code: 20001, Message: ORA-20001: -Please enter CONTAINER_ID -  Enter PO_NO -
    ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
    ORA-06512: at line 1
    12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR          BnePLSQLUpload.doUpload: Stack trace: java.sql.SQLException: ORA-20001: -Please enter CONTAINER_ID -  Enter PO_NO -
    ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
    ORA-06512: at line 1
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
      at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
      at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
      at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:202)
      at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1005)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3449)
      at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3550)
      at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4710)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
      at oracle.apps.bne.integrator.upload.BnePLSQLUpload.doUpload(BnePLSQLUpload.java:284)
      at oracle.apps.bne.integrator.upload.BneSAXUploader.processDeepestLevel(BneSAXUploader.java:2346)
      at oracle.apps.bne.integrator.upload.BneSAXUploader.startElement(BneSAXUploader.java:1182)
      at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:181)
      at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
      at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
      at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
      at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:234)
      at oracle.apps.bne.integrator.upload.BneUploader.processUpload(BneUploader.java:301)
      at oracle.apps.bne.integrator.upload.BneAbstractUploader.processUpload(BneAbstractUploader.java:114)
      at oracle.apps.bne.integrator.upload.async.BneAsyncUploadThread.run(BneAsyncUploadThread.java:140)
    12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 WARNING        BneOracleWebAppsContext.getTimeZone CLIENT_TIMEZONE_ID has not been set
    12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 ERROR          BneOracleWebAppsContext.getExtraJDBCConnection recieved the same connection as the base connection.  There may be transaction problems.
    How to show the same error in the excel template?
    Here is the package:
    CREATE OR REPLACE PACKAGE BODY APPS.XXPO_COSTFACTS_WEBADI_PKG
    AS
       PROCEDURE upload_data (
                              P_CONTAINER_ID IN VARCHAR2
                            , P_SAIL_DATE IN DATE
                            , P_PO_NO IN VARCHAR2                     
                             ) IS
        --declare
        lv_err_msg      VARCHAR2(240);
        lf_err_flag     NUMBER := 0;
        ln_temp         NUMBER;
        BEGIN
        --------------------- checking for mandatory parameters---------------------------
          IF (P_CONTAINER_ID IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg||'-'||'Please enter CONTAINER_ID - ';
          END IF;
          -------------Validation for Sail Date Format----------------------
          IF (P_SAIL_DATE IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg || ' ' || 'Enter Sail Date - ';
          ELSE
             BEGIN
                SELECT 1
                  INTO ln_temp
                  FROM DUAL
                 WHERE P_SAIL_DATE =  TO_DATE (TO_CHAR (P_SAIL_DATE, 'DD-MON-YYYY'), 'DD-MM-YYYY');
             EXCEPTION
                WHEN NO_DATA_FOUND THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format';
                WHEN OTHERS THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format'|| SQLERRM;
             END;
          END IF;
          -------------Validation for PO_Number----------------------
          IF (P_PO_NO IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg || ' ' || 'Enter PO_NO - ';
          ELSE
             BEGIN
                SELECT count(1)
                  INTO ln_temp
                  FROM PO_HEADERS
                 WHERE Attribute4 =  P_PO_NO;
             EXCEPTION
                WHEN NO_DATA_FOUND THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' No Oracle PO for Biceps PO#'||P_PO_NO;
                WHEN OTHERS THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Error getting the Oracle PO for Bicpes PO#'||P_PO_NO||' Error-' || SQLERRM;
             END;
          END IF;
         -----------------------Insert Record----------------------------
         IF lv_err_msg is NULL THEN
         BEGIN
             INSERT
              INTO XXP2P_HW_COST_FACTORS_STG
                     CONTAINER_ID
                    ,SAIL_DATE
                    ,PO_NO
                    , ERROR_FLAG
                    , ERROR_MSG
                   ,CREATED_BY
                    ,CREATION_DATE
                    ,LAST_UPDATED_BY
                    ,LAST_UPDATE_DATE
                    ,LAST_UPDATE_LOGIN              
                VALUES
                     P_CONTAINER_ID
                    ,P_SAIL_DATE
                    ,P_PO_NO              
                    ,lf_err_flag
                    ,lv_err_msg
                  ,FND_GLOBAL.USER_ID
                    , trunc (sysdate)
                    ,FND_GLOBAL.USER_ID
                    , trunc (sysdate)
                    ,FND_GLOBAL.LOGIN_ID              
                  --  commit;
                  DBMS_OUTPUT.put_line
                    '-' || 'After ap_invoices_interface'
            EXCEPTION
            WHEN OTHERS THEN
              ROLLBACK;
              lf_err_flag := 1;
              lv_err_msg  := lv_err_msg || ' ' || 'error loading CONTAINER_ID-' || P_CONTAINER_ID || SQLERRM;
              raise_application_error(-20001, lv_err_msg);
            END;
        ELSE
              raise_application_error(-20001, lv_err_msg);
        END IF;
      END upload_data;                        
    END XXPO_COSTFACTS_WEBADI_PKG;

  • Updated to an iphone 4s from iphone 4. Did backup and sync but some apps have not been copied to the 4s although they do show up on the iphone4. How can I get my missing apps?

    Updated to an iphone 4s from iphone 4. Did backup and sync but some apps have not been copied to the 4s although they do show up on the iphone4. How can I get my missing apps?

    Download Past Purchases
    http://support.apple.com/kb/HT2519
    Log into iTunes using the account the Purchase was made with... Click on Buy... and a notice will come up saying you already have it... do you wish to download it again... Click Yes...

  • I have two cell phone, different numbers.  Each has their own apple id.  How can i merge them so apps on one show on the other but keep their emails addresses separate on their own phone?

    Have two cell phones, different numbers.  Each has their own apple id.  How can I merge them so apps purchased on one phone show on the other.  But.as each has their own email address, I want to keep these email addresses separate on their own phone?  Thanks.

    We do this in my family now.  We have one account for purchases, so it is used to share music and apps (I think that is in Settings/iTunes & App Stores).  Each iDevice has this configured.
    Then, each of us has our own iCloud account that is configured under Settings/iCloud.  That then allows us to have our own Mail/Contacts/Calendars/Reminders/Safari Bookmarks/Notes/Passbook/Photo Stream/Documents & Data/Find My iPhone/and Backup.  That Backup piece is pretty sweet and comes in handly if you replace your iDevice.  You can just restore from it.
    So we all share the Apple Store account but we all have our own iCloud accounts to keep the rest seperate or things like you mentioned are a nightmare.
    In answer to what iCloud does for you: http://www.apple.com/icloud/features/
    Think of it as an internet based ("cloud") area for all of those items listed in my response.  What you need to remember is photo stream only maintans the last 1000 pictures so don't count it as a complete backup solution for your pictures.  Even though I rarely sync with a computer these days, I do still try to sync my phone with iPhoto (I have an iMac) so that I have copies of all of my pictures.  1000 may not stretch as far as it sounds.
    Message was edited by: Michael Pardee

  • My iPad 2 shows I have 7 apps that need to be updated and when I go into my App Store it won't pull up anything for my updates how can I fix this????

    My iPad 2 shows I have 7 apps that need to be updated and when I go into my App Store it won't pull up anything for my updates how can I fix this????

    It seems Apple is having some issues at their end. There have been hundreds of posts on the forum with the same problem.

  • My Location Settings button is not showing up in Settings App. How do I get it to show up?

    My Location Settings button is not showing up in Setting App. How do I get it to show up?

    Try Settings>Privacy>Location Services and switch it on.  You will see a list of apps that you turn on/off for location services.

  • Trying to install airport 5.6 to configure old UFO airport but doesn't show up in the app utility folder. How do you configure older Airports in OS X 10.7.5??

    trying to install airport 5.6 to configure old UFO airport but doesn't show up in the app utility folder. How do you configure older Airports in OS X 10.7.5??

    David Why? wrote:
    ... How do you configure older Airports in OS X 10.7.5??
    Use the technique described in this thread: I can't install airport utility 5.6
    Though it discusses Mountain Lion, you need to follow the exact same steps for OS X 10.7.5.
    I no longer have any original AEBSs to test. You may need an even earlier version of AirPort Utility. If AirPort Utility 5.6 cannot configure yours, let me know and I will attempt to find the correct version for you. You will need to use the same "extraction" technique described above.
    Edit: If 5.6 does not work try this one: AirPort Utility 5.5.3
    Important: If you elect to drag that version to your Utilities folder, be sure to give it a unique name. I suggest "AirPort Utility 5.5.3" This is not necessary for AirPort Utility 5.6, which will retain that name on its own.

  • I just installed ios7 on my iPhone 4s.  It seems to be working fine but all of the apps I had previously installed are gone.  They show up in my app store as purchased, but the shortcuts are gone.  Does anyone know how to get the shortcuts back?  Thanks!

    I just installed ios7 on my iPhone 4s.  It seems to be working fine but all of the apps I had previously installed are gone.  They show up in my app store as purchased, but the shortcuts are gone.  Does anyone know how to get the shortcuts back?  Thanks!

    I updated via my iPhone 4s.  The apps were on my iPhone 4s.  That's all the information that I have.  The update to ios7 seems to have gone smoothly - everything else is working, phone texting, email, internet, etc.  But all of the apps I had installed over the past year are no longer showing up as shortcuts.  No facebook, no twitter, no espn, etc.  They are all still listed in my app store as purchased, but the shortcuts and my folders are gone.  Thanks.

  • How do I get the bookmarks app for ipad to show my bookmarks in their entirety instead of cutting off the end?

    how do I get the bookmarks app for ipad to show my bookmarks in their entirety instead of cutting off the end?

    See also:
    *CheckPlaces: https://addons.mozilla.org/firefox/addon/checkplaces/
    *Bookmark Favicon Changer: https://addons.mozilla.org/firefox/addon/bookmark-favicon-changer/

  • I updated to ios8 and tried to use Health Application. In Sources I get a message that other applications will show up on the list as they request permission to update your data. How does it happen? No apps are listed on my Sources section

    I updated to ios8 and tried to use Health Application. In Sources I get a message that other applications will show up on the list as they request permission to update your data. How does it happen? No apps are listed on my Sources section

    I have an answer to my question. There is a bug in IOS8 that prevents third party applications to talk to the Health Application. Apple is trying to fix it ASAP

  • There is an app that I did not download in my update section.  I read reviews and it seems to be spy ware.  How do I get it from not showing up on my app updates?

    There is an app that I did not download in my update section.  I read reviews and it seems to be spy ware.  How do I get it from not showing up on my app updates?  I do not want to download or update it, obviously. 

    If the app is G-Toolkit and you have a Gmail app on your iPhone, delete the Gmail app.  Apparently the G-Tool kit is tied to a Gmail app.  From searching the web my impression is that G-Toolkit is not spyware and is from a legitimate company that produces app for several platforms.

  • HT4792 how to get imovie to show up in the apps on iTunes?

    i tried to follow the steps on how to get imovie projects to ipone but the imovie app doesnt show up in the apps on itunes.

    So, when you go in to System Preferences > Print & Fax > Set Up fax Modem ..., Internal Modem is NOT showing up in Fax List?
    Does Internal Modem.app exist in /Users/{shortUserName}/Library/Printers/?

  • The software update badge does not show on the settings app on iphone 4s?? How to fix it?

    Hi ,
    I have a new iphone 4s and since i have baught , the new software update badge does not show on the settings app icon in my phone ,
    Though the new update shows in the software update menu.
    Any idea how to make the icon show the badge ???

    Software Update option is only available if you have IOS 5 or above.
    Your iPhone 3G IOS 4.2.1 is the end of line, there's no more update for this model.

  • So my Ipod Touch restored for some reason, and it doesnt show any of the apps i bought on iTunes. How do I make them come back?

    So my Ipod Touch restored for some reason, and it doesnt show any of the apps i bought on iTunes. How do I make them come back? Please Help

    Redownload them from the iTunes Store. It's free.
    (58292)

  • I have a new hard drive. iPhoto does not show as purchased in App Store although I had it on the old hard drive. How do I reinstall it without buying it again?

    I have a new hard drive. iPhoto does not show as purchased in App Store although I had it on the old hard drive. How do I reinstall it without buying it?
    Thank you.
    John

    Depends on where you got it - if it came on yoru compujter then you need to have accepeted it in the App store - and it will be in your purchases when you log in with the Apple ID that you used to set up your computer - it mahy be hidden - if you do not find it unhide applications in teh App store
    LN

Maybe you are looking for