Download Excel file from Webdynpro

I have recently created functionality in a Webdynpro application that downloads an Excel 2003 file.  Unfortunately I also need to allow a download for a file to prior versions of Excel.  Does anyone have a code snippet that will perform this type of function?

Hi Atilio.
The tutorial 34 under the following link:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on excel export using the web dynpro binary cache - 34.htm
Explains how to download the content of a table from a wdp app to an Excel 2003 file.
Best Regards.
Gregory.

Similar Messages

  • Download Excel file from  from a second server

    Hi,
    In our Java based web application (jsp pages) users need to download Excel files stored on a different server (business tier) than the first application server server that hosts only the presentation tier.
    For security reasons users don't access the second application server. From a technical point of view what's the best solution to answer this requirement ? The logic should be the following: the user clicks on a report name that is displayed on this browser, the request is sent to the first application server that will retrieve the report stored on a second server and will return it to the user.
    Thanks a lot.

    it's been a while since i've done ejb stuff, but i believe you can configure an ejb to "runas" a different user. so, you would configure an ejb on the accessible server to "runas" a user who has access to the secondary server.

  • How to download data in Word or Excel file from webdynpro?

    Hello everybody,
    In my webdynpro application, I want to download my Table control data in word or excel file. Is there anyway to do this?
    Thanks in advance,
    Bhavik

    I am sorry.Please ignore this reply
    Please go through the following
    downloading internal table contents to excel sheet
    Regards,VIP
    Message was edited by: Anilkumar Vippagunta
    Message was edited by: Anilkumar Vippagunta

  • Downloading excel file from FTP Server to Application Server

    Hi,
    I have to get data from an excel file available on FTP server into an Internal table.Can I use FTP_SERVER_TO_R3 to do so.
    Please let me know if there are any function modules available to do this.
    Thanks,
    Prasuna.

    Dear Gayatri,
    You can get the file from FTP to internal table...
    I am sending you the code with inline comments ....Hope this will be helpful to you.
    Data: lv_key           TYPE i VALUE 26101957.
    Data: lv_password(30)  TYPE c.
      i_rfc_destination = 'SAPFTP'.
      lv_length = STRLEN( i_password ).
    CALL FUNCTION 'HTTP_SCRAMBLE'
        EXPORTING
          SOURCE      = i_password "give ftp server pwd
          sourcelen   = lv_length
          key         = lv_key
        IMPORTING
          destination = lv_password.
      CALL FUNCTION 'FTP_CONNECT'
        EXPORTING
          user            = i_user "give ftp user name
          password        = lv_password
          host            = i_host
          rfc_destination = i_rfc_destination
        IMPORTING
          handle          = lv_ftp_handle
        EXCEPTIONS
          not_connected   = 1
          OTHERS          = 2.
        CONCATENATE 'cd' i_folder_path INTO lv_cmd SEPARATED BY space.
    *i_folder path is the path in ftp server where file is  stored
        CALL FUNCTION 'FTP_COMMAND'
          EXPORTING
            handle        = lv_ftp_handle
            command       = lv_cmd
          TABLES
            data          = result
          EXCEPTIONS
            command_error = 1
            tcpip_error   = 2.
         lv_blob_length = 392.
         TRANSLATE i_filename TO LOWER CASE.
          CALL FUNCTION 'FTP_SERVER_TO_R3'
            EXPORTING
              handle      = lv_ftp_handle
              fname       = i_filename          "give required file name
            IMPORTING
              blob_length = lv_blob_length
            TABLES
              blob        = lt_dummy.
    Regards
    Sajid

  • Strange: When download excel file from Apex, it ask XDB username/password.

    Hi
    I'm using Apex 4.0.1 on Oracle 10.2.0.3, I have a application where end user can upload some file(excel/PDF/Word) as an attachment and later on they will download. Everything is fine but one thing:
    When User press the download button, a popup window asking you whether you want to open it or save it. when it's PDF/Word file, all works fine no matter what you choose; but when it's an Excel file, if we try to open it(press the open), it will popup a window saying 'XDB need a username and password'. But if you ingore it, it did open the file without any issue; If user press Save button, no issue at all.
    So the app still work but it's kind of annoying..
    Any one seen this before? Any idea?
    Thanks
    Mike
    Edited by: mike on Feb 24, 2011 1:47 PM

    You should open the excel file in binary mode, in that case, no errors will occur.
    Also, there is a very good package located on
    http://stareyes.homeip.net:8888/. It's free. The only thing is the server open
    for a certain hours during the weekday. 11:00amp to 7:00pm New York time zone.

  • I am unable to download excel file from company portal.

    I have not installed any reader. Kindly suggest which is the best software for create, edit, view PDF, Word, Excel etc ...

    Apple’s having trouble with the iTunes Store servers right now. Wait for them to resolve the issue.
    (123904)

  • Download all excel files from sharepoint location to local folder

    Hi,
    How to I copy all excel files stored at sharepoint location to local folder?
    Regards,
    Nidhi

    Hi NidhiP,
    To download Excel files from a SharePoint library by using SSIS, we need to make use of the Script Task. In the Script Task, we can use the methods provided by
    Lists Web Service to work with SharePoint files, and then use the
    WebClient.DownloadFile Method or
    FileStream Class to transfer the files from SharePoint to local file system.
    For the code examples, please refer to:
    http://www.codeproject.com/Questions/457161/how-to-download-files-from-Sharepoint-document-lib?tab=mostrecent 
    http://blogs.msdn.com/b/sowmyancs/archive/2007/09/15/how-to-download-files-from-a-sharepoint-document-library-remotely-via-lists-asmx-webservice-sps-2003-moss-2007.aspx 
    http://sqlblogcasts.com/blogs/drjohn/archive/2007/11/04/downloading-excel-files-from-sharepoint-using-ssis.aspx 
    Regards,
    Mike Yin
    TechNet Community Support

  • Filename of downloaded Excel file

    I frequently download Excel files from a website that seems for the most part windows centric. These excel files have an extension of .xls, I can double click them to open, but when opened they just have the file name of WORKSHEET. If I rename the file in the finder the same thing happens. If I try to open the file in numbers I get something like
    <table border="1">
    <!-- <tr><td colspan = "15" valign="middle" align="center">Date: 8/1/2008</td></tr>-->
    <!-- <tr><td colspan = "15" valign="middle" align="center">Investor's Business Daily Æ</td></tr> -->
    <tr><td colspan = "15" valign="middle" align="center">Investor's Business Daily 100</td></tr>
    <tr><td colspan = "15" valign="middle" align="center">Data as of 8/1/2008 market close</td></tr>
    Any idea? Now I have to open the file in excel, then do a save as, type in the file name (if I don't want WORKBOOK), then delete (or write over) the original file. What can I tell the website people?

    Hello ,
    In my procedure i am passing id and with the help of that id , ia am fetching values from the database.
    i have declared on clob type variable say v_insert where i am storing table structure(like worksheet) which i need on excel
    example
    v_insert := v_insert||'<tr>';
            v_insert := v_insert||'<td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td><b>Column1_Value</b></td> <td>abc</td>';
        v_insert := v_insert||'</tr>';then i am converting that clob into blob and storing the content into BLOB type variable say v_blob
    below is the code used for downloding the blob content.
    wpg_docload.download_file(v_blob);Thanks,
    Jitendra

  • In SAP Webdynpro using ABAP,how to colour the downloaded excel file?

    Hi all Experts'
    I have downloaded the data from the webdynpro application into an excel file in the presentation server using a custom button in a layout of a view in the webdynpro component.
    Now the requirement is to colour the column heading names and the downloaded excel file should show the full column length.
    Could anybody help me on this how to do this two things.
    Thanks in advance.

    Hi,
    You can use this function GUI_EXEC.
    Let say you want to use winzip to zip the file then what you should do like this:
    use this command --> ' -min -a D:\WALCOTT.ZIP D:\MBARANG.TXT'
    D:\MBARANG.TXT --> path to the file you want to Zip
    D:\WALCOTT.ZIP --> result zip file
    The command above is depends on the software you use to zip.
    then
      DATA: cmdguiexec(150).
      cmdguiexec = cmd.
      CALL FUNCTION 'GUI_EXEC'
        EXPORTING
          command          = cmdguiexec.
    Hope this help you.
    Best Regards,
    Victor.

  • How to download a file from AL11 inot Excel format without collapse the col

    Hi,
    Please suggest how to download a file from AL11 to Excel sheet.currenlty all field are merging into single column.I writing this file via using DATASET.
    Regards
    Ricky

    Hi,
       Try this code,
    ==============================================
    TYPES : BEGIN OF ty_emp,
              empno(2) TYPE c,
              empid(10) TYPE c,
              empname(3) TYPE c,
            END OF ty_emp.
    DATA : it_emp TYPE TABLE OF ty_emp,
            wa_emp TYPE ty_emp.
    DATA : pbk TYPE string.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS : p_file TYPE rlgrap-filename.
    PARAMETERS : p_asfile TYPE rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK b1.
    pbk = p_file.
    OPEN DATASET p_asfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      DO.
        READ DATASET p_asfile INTO wa_emp.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        APPEND wa_emp TO it_emp.
      ENDDO.
    CLOSE DATASET p_asfile.
    Filling the already created file with download PS radiobutton
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
      BIN_FILESIZE                  =
          filename                      = pbk
      FILETYPE                      = 'ASC'
         append                        = 'X'
         write_field_separator         = ' '
      HEADER                        = '00'
      TRUNC_TRAILING_BLANKS         = ' '
      WRITE_LF                      = 'X'
      COL_SELECT                    = ' '
      COL_SELECT_MASK               = ' '
      DAT_MODE                      = ' '
    IMPORTING
      FILELENGTH                    =
        TABLES
          data_tab                      = it_emp
    EXCEPTIONS
      FILE_WRITE_ERROR              = 1
      NO_BATCH                      = 2
      GUI_REFUSE_FILETRANSFER       = 3
      INVALID_TYPE                  = 4
      NO_AUTHORITY                  = 5
      UNKNOWN_ERROR                 = 6
      HEADER_NOT_ALLOWED            = 7
      SEPARATOR_NOT_ALLOWED         = 8
      FILESIZE_NOT_ALLOWED          = 9
      HEADER_TOO_LONG               = 10
      DP_ERROR_CREATE               = 11
      DP_ERROR_SEND                 = 12
      DP_ERROR_WRITE                = 13
      UNKNOWN_DP_ERROR              = 14
      ACCESS_DENIED                 = 15
      DP_OUT_OF_MEMORY              = 16
      DISK_FULL                     = 17
      DP_TIMEOUT                    = 18
      FILE_NOT_FOUND                = 19
      DATAPROVIDER_EXCEPTION        = 20
      CONTROL_FLUSH_ERROR           = 21
      OTHERS                        = 22
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ==============================================
    Regards,
    Krrishna

  • How to download file from Webdynpro ABAP?

    Hello,
    What is the best way to download a file from ABAP Webdynpro?
    I tried calling method *cl_gui_frontend_services=>gui_download*
    from within an Action of my WDA, but it got an error 06, which is "Unknown Error" (not very helpful).
    The same code works when I execute it from a regular ABAP program.
    I am not using ALV.  I just created a file by reading a database with WDA selection fields, then transformed it to XML using CALL TRANSFORMATION.
    Thanks,
    Colleen

    You can't use the GUI_DOWNLOAD, because you have no GUI present, which is the reason why you are getting the error. You will want to take a look at the class/method  cl_wd_runtime_services=>attach_file_to_response
    Regards,
    Rich Heilman

  • HT2488 How do I create a workflow in Automator or a script in AppleScripts to download an excel file from a specific webpage?

    I would like to create a workflow in Automator or a script in AppleScript (or a combination of the two), that opens Safari to a specified page and downloads an excel file from this page and saves the downloaded document to my desktop.
    Is this something that be done? If so, how?
    I have so far been able to build a workflow in Automator to open Safari and added an AppleScript that takes Safari to a specific page that has an Excel document.
    I can't figure out where to go from here... Any help would be apprecitated.
    Thanks!

    Would you have the web address the excel sheet is on?
    Is there a simular web page you could point to if not?
    Would there be a copy of the file on an FTP page.  This would be easier. 
    curl
    http://www.cyberciti.biz/faq/mac-os-x-terminal-download-file/
    http://www.thegeekstuff.com/2012/04/curl-examples/
    http://curl.haxx.se/docs/manpage.html
    Macintosh-HD -> Applications -> Utilities -> Terminal
    # Press return to run a command.
    the curl is a terminal command ( Unix ).  It allows you to read a file off of the web.
    man curl
    provides cryptic information on the commnad curl.
    press the space bar to advance  a page.
    press letter to q to quit.
    What you may have to is to read in the web page as a text file.  Go "fishing" through the page to find the excel file you need.  Once you find the file, you can use curl to read the file.
    curl is a very full featured command.  (read complex to figure out ).
    It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on.  Here is an example.
        Author: rccharles
        For testing, run in the Script Editor.
          1) Click on the Event Log tab to see the output from the log statement
          2) Click on Run
        For running shell commands see:
        http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
    on run
        -- Write a message into the event log.
        log "  --- Starting on " & ((current date) as string) & " --- "
        --  debug lines
        set desktopPath to (path to desktop) as string
        log "desktopPath = " & desktopPath
        set unixDesktopPath to POSIX path of desktopPath
        log "unixDesktopPath = " & unixDesktopPath
        set quotedUnixDesktopPath to quoted form of unixDesktopPath
        log "quoted form is " & quotedUnixDesktopPath
        try
            set fromUnix to do shell script "ls -l  " & quotedUnixDesktopPath
            display dialog "ls -l of " & quotedUnixDesktopPath & return & fromUnix
        on error errMsg
            log "ls -l error..." & errMsg
        end try
    end run

  • I can't download PDF files or excel files from my email

    Why I cannot download PDF or excel files from my email. I click on the attach but it does nothing at all

    You are saying that files are not opened in the mail app when you are reading the email or the file does not open when you tap on the icon?
    Try quitting the mail app and the launch it again. Try restarting the iPad as well.
    To quit the mail app ....  Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.

  • Weblogic call a excel-file from URL doesn't open MSExcel but flat html

    Weblogic call a excel-file from URL doesn't open MSExcel but flat html
    Hi,
    WLS 10.3.5
    Forms 11.1.1.4
    I do migrate from AS10g to WLS 10.3.5 / Forms 11
    I get differences between FORMS 10 g / AS and FORMS 11 / WLS
    when call an excel-file with web.showdocument
    in 10g AS10g
    the call
    web.showdocumen('http://MyAS10_Server/myFormsMapping/myExcelfile.xls, _blank);
    opens a Windows-Box
    to decide
    open with ( MSExcel )
    or
    download and save as File
    in WLS 10.3.5 / FORMS 11.1.1.4
    the call with webcache Port 8090 as well as Port OHS 8888
    web.showdocumen('http://MyWLS_Server:8090/myFormsMapping/myExcelfile.xls, _blank);
    opens promptly the excel-File into the Browser as html-Format
    How to get the same way under WLS as before in AS 10g,
    config OHS ?
    regards
    get answer here :
    Weblogic: when call a excelfile from URL doesn't open MSExcel but flat html
    Edited by: astramare on Sep 12, 2011 11:59 AM

    Weblogic: when call a excelfile from URL doesn't open MSExcel but flat html

  • Fetch excel file from app. server using open dataset...

    Hello Experts,
    Our functional consultant is asking me if it possible to get an excel file from the
    application server file using OPEN dataset and in background mode? If yes, Please tell me on how to do this.
    Thank you guys and take care!

    Hi Viraylab,
    to download this the procedure:
    you can use the FM 'EXCEL_OLE_STANDARD_DAT ' for this purpose.
    this FM 'EXCEL_OLE_STANDARD_DAT' can be used to start Excel with a new sheet and transfer data from an internal table to the sheet.
    Here are some of the parameters:
    file_name: Name and path of the Excel worksheet file e.g. ?C:TEMPZTEST?
    data_tab: Name of the internal table that should be uploaded to Exvcel
    fieldnames: Internal tabel with column headers
    How to build the field names table:
    data: begin of i_fieldnames occurs 20,
    field(60), end of i_fieldnames.
    i_fieldnames-field = ?This is column 1?. append i_fieldnames-field.
    i_fieldnames-field = ?This is column 2?. append i_fieldnames-field.
    to upload follow this:
    OPEN DATASET dsn FOR INPUT IN BINARY MODE.
    DO.
    READ DATASET dsn INTO itab-field.
    IF sy-subrc = 0.
    APPEND itab.
    ELSE.
    EXIT.
    ENDIF.
    ENDDO.
    [/code]Rob
    or Try this function module.
    FILE_READ_AND_CONVERT_SAP_DATA
    pass 'XLS' to I_FILEFORMAT..
    Dont forgot to Reward me points .....All the very best....
    Regards,
    Sreenivasa sarma K.

Maybe you are looking for

  • Macbook won't start up while firewire audio interface is plugged up

    I have a m-audio firewire solo and a presonus firebox, both firewire interfaces. My macbook won't start up when either is plugged up. If I restart with it plugged up I just get a grey screen. When I disconnect it I boot up fine. Is this normal or is

  • Animation Performance and Optimization

    Hi, and thanks for reading in advance! I'm struggling with getting "smooth-enough" performance for a simple application I'm writing.  I was hoping someone could give some pointers.  Briefly my proof of concept application creates between 1 and 10 ind

  • How to set UOM in the material Specification Section of Trade?

    Dear, When I select UOM in the material Specification Section of Trade, I cannot find Volume UOM as ml , L... How Can I add some UOM Item for this Qty column? Because some beverage products use volume UOM. Thanks

  • Release strategy for PR with materials having different prices

    Hai Gurus Can we make a release strategy for a variant configured material ? I mean create a strategy in such a way that price is critical factor and the materials what ever we choose for the PR has different characteristics dependencies like for exa

  • Restablish BW Connection - Error

    Hi folks, After a Homogenous System copy, I am not able to stableish a communication between my APO and BW system., I am facing the following error during the RSA1 procedure: Please enter a valid receiver port Diagnosis An entry with the key /<SID>LN