Download excel File WITHOUT IWDLinkToURL

Good morning.
       I need to open an excel file for the customer to open or save, as it is with a IWDLinkToURL, but I can not do it with a IWDLinkToURL by specifications of the application that I'm doing.
       Consider the following code:
           IWDCachedWebResource cachedExcelResource = null;
     wdThis.wdGetReportesComponentsController excelXMLFile = (). ToExcel (DataNode, columnInfos, selectionElement). getBytes ("UTF-8");
cachedExcelResource = getCachedWebResource (excelXMLFile, fileName, WDWebResourceType.XLS)
    Taking the object cachedExcelResource, how could deploy automatically?
     I thought of the possibility of placing the object invisible and shoot IWDLinkToURL some onClick event, but I do not know how to manipulate objects of sight from the controller's view.
     The other option is to set the onClick of IWDLinkToURL but I found its implementation.
     Thank you very much!

check if the file is generated correctly.
try below code :
File f = new File("abc.xls");
--logic to write data in file f----
FileInputStream excelCSVFile = new FileInputStream(f);
cachedExcelResource=getCachedWebResource(
                                           excelCSVFile,  fileName,
                 WDWebResourceType.getWebResourceType( "xls", "application/ms-excel"));
---- method---
private IWDCachedWebResource getCachedWebResource(
            InputStream file,
            String name,
            WDWebResourceType type)
            IWDCachedWebResource cachedWebResource = null;
            if (file != null)
                 cachedWebResource = WDWebResource.getWebResource(file, type);
                 cachedWebResource.setResourceName(name);
            return cachedWebResource;
Regards
Deepak

Similar Messages

  • URL Link on downloaded Excel File

    Hi,
    I have got a requirement.
    For study and analysis purpose user download data on excel file from OCOD. Struture(Contents) of downloaded excel file is same as screen.
    But the problem is when user click on 'DETAIL' (which has URL link) he/she is directed to Live OCOD and asked for log in with ID and Password, even if
    user is logged in OCOD.
    What i want to do is.
    1) Download Excel file without any URL link.
    2) If 1) is not possible then do not want to have 'DETAIL' option of downloded file.
    3) Method for avoiding relog into OCOD.
    Thanks in Advance
    Yuj

    Yuj, within the application click on the Training and Support link in the upper right, then click on Add-On Applications, then click on Reports and Analysis for Excel Template. In order to take the webinar click on Browse Training, then click on Training Resources by Job, then click on All Users, then click on Using Mail Merge for Word and Reports and Analysis for Excel with Oracle CRM On Demand.

  • How to export the text edit data to excel file without splitting the data in excel file?

    how to export the text edit data to excel file without splitting the data in excel file?
    I have a requirement in SAP HR where in the appraiser can add comments in the area given and can export that to excel file. Currently the file is getting exported but the comments getting split into deifferent rows.
    I want the entire comment to be fit in one row.
    Please help.
    Thank you

    Hi,
    if your text edit value is stored in 'lv_string' variable.
    then before exporting the value to excel you have to remove CL_ABAP_CHAR_UTILITIES=>NEWLINE
    that is '#' from the variable lv_string.
    for that use code some thing like this.
    REPLACE ALL OCCURRENCES OF CL_ABAP_CHAR_UTILITIES=>NEWLINE in lv_string WITH space.
    I think this will do the trick.

  • 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.

  • 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.

  • 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

  • Where are the Download Excel Files going?

    Safari 6 seems to download Excel files as requested from a web site but they do not appear anywhere in the Download Folder I have specified. The site successfully downloaded the files before I upgraded to Safari 6. I now have to switch to Firefox to download these files.  Where are they going?

    Erik Lommers (guest) wrote:
    : What happened to the files? Yesterday I tried to download the
    : different trunks of the ora805 file and suddenly everything
    : stops.
    : The ftp-server is there, but the whole linux directory is gone!
    : Does anyone have an explanation?
    : When will the files be available again?
    Point your browser to:
    http://www.oracle.com/products/trial/html/trial.html#oracle8
    null

  • 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.

  • Download Excel file using JSP

    Hi All,
    I am working on a JAVA/JSP application. JSP page passes the user inputs to JAVA page (using POST method) which queries to the database and generate an Excel file and returns the link for that file. I am displaying that link in JSP page ("Your file is successfully saved. Click here to download or view your file).
    Now what I want is when the user clicks on the link, open/save dialog will appear which give flexibility to the user to download or view the file in same JSP page. The problem is I don�t want to post again the data or dont want to open a child window. How to set the content type without posting it (I don�t know much about this). Is there any way to do this?
    Any help is highly appreciated. Thanx in advance
    Cheers
    Inderpal

    Hi
    Iam retreiving a file which is in image type in Ms SQl database, but while im retreiving the data from database using Servlet OutputStream the data is showing in binary format with all speciall symbols and text inside .Iamunable to find the solution for that,
    Pleas help me
    my code
              response.setContentType("application/msword");                    
                   OutputStream ros = response.getOutputStream();
              ros.flush();
                   ros.write(bt,0,bt.length);
    Thankz for ur help ,
    my id: [email protected]

  • Dump - While downloading Excel file in Back Ground job.

    Hi Friends,
    I am running a report program in BackGround mode and Downloading an Excel file.
    Getting the following dump report. (Working in 4.6C)
    ABAP/4 processor: RAISE_EXCEPTION
    Job cancelled
    Help me to resolve this.
    000380       CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES
    000390         EXPORTING
    000400           DIRECTORY                   = FILE
    000410           FILTER                      = ''
    000420           FILES_ONLY                  = 'X'
    000430   *    DIRECTORIES_ONLY            = 'X'
    000440         CHANGING
    000450           FILE_TABLE                  = filetab
    000460           COUNT                       = count
    000470         EXCEPTIONS
    000480           CNTL_ERROR                  = 1
    000490           DIRECTORY_LIST_FILES_FAILED = 2
    000500           WRONG_PARAMETER             = 3
    000510           ERROR_NO_GUI                = 4
    000520           others                      = 5.
    000530
    000540       IF SY-SUBRC <> 0.
         >         RAISE CNTL_ERROR.
    000560       ENDIF.
    I am calling the methods as shown below.
    CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          filename                = l_file
          write_field_separator   = 'X'
        CHANGING
          data_tab                = i_header
        EXCEPTIONS
          OTHERS                  = 22.
      IF SY-SUBRC NE 0.
       MESSAGE S208(05) WITH 'File download is failed'.
      else.
       MESSAGE S208(05) WITH 'File downloaded to specified path'.
      ENDIF.
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          filename                = l_file
          append                  = 'X'
          write_field_separator   = 'X'
        CHANGING
          data_tab                = i_output
        EXCEPTIONS
          OTHERS                  = 22.
      IF SY-SUBRC NE 0.
       MESSAGE S208(05) WITH 'File download is failed'.
      else.
       MESSAGE S208(05) WITH 'File downloaded to specified path'.
      ENDIF.
    Regards,
    Viji

    HI Vijayalakshmi,
    you are using cl_gui_frontendsevices...class in background...
    Is it possible to use this class in the background??
    Plz check once...
    Regards,
    Vamshi

  • Download a file without opening new window

    Hi everybody,
    I need to save a file to local PC into a certain predefined file in such a way that user does not get any pop-ups or new windows - i.e. 'in background'.
    I have tried 'FileDownload' - this get file content displayed in new window and if saved is to be allowed - a save pop-up is displayed.
    If I try attach_file_to_response of cl_wd_runtime_services - it also gives a pop-up.
    Does anybody know a way to download a file to local PC in such a way that the content of the file is not displayed in the new pop-up window and save dialog does not appear?
    Thank you for your help.
    Helen

    Hi Olena,
    You will not be able to download a file in the background due to the browser security defaults. All browsers always prompt the users to accept files otherwise viruses and trojans would be able to be installed on your pc without you accepting them.
    I know it is possible to write via SAPGui without a prompt but not from a browser.
    Sorry.
    Richard
    PS Dont forget the points!

  • Download ZIP file without changing file extension

    I regularly download a zipped csv file, of the format: "filename.csv.gz". As the name does not change, Firefox adds a digit to distinguish it, so for example I get "filename.csv-3.gz". This is a pain as it changes the file extension which means that I cannot open the extracted file without first renaming it. I want to keep an archive of all the files, so deleting them each time isn't really an option, and neither is moving them to a different location each time. Is there any way the naming convention for downloads can be changed?

    I think you have to disable it in your Operating system:
    8dot3NameCreation
    [http://support.microsoft.com/kb/121007]

  • How to download Excel file in JSP Page

    Actually I have a page
    Where I am uploading the files to server and it is listing the files which are all uploaded to the server.
    If I try to click the file which is uploaded it has to download to the local system.
    DOC, TXT, PDF, PPT. These file formats are try to download to local. But Excel file, opening the file content only not downloading to local.
    Any solution

    Hi Bangalore:
    As my experience,there may be some symbol such as "\r\n" was added in the content of the Excel file you want to download. this is no porblems to text format file, but to binary format file, such file can not be open. So I suggest you check-up the content of the file befor it was writed to the client, remove unwanted symbol, it should be word!
    I'm a newer to the here , and my english is poor. I thirst for intercommunion, I'm sorry for the syntax error in my reply.

  • Download Excel file through Web dynpro with no windows open?

    Can we have a web dynpro application that just returns an Excel file in the response with no open windows? Similar to a java servlet that is used to download a Excel file?
    This basically means that I cannot use wdComponentAPI.getWindowManager().createNonModalExternalWindow()
    Java Servlet Code
    HttpSession session = request.getSession();      // get a handle on the session id
    response.setContentType("application/download");
    response.setHeader("Content-Disposition", "filename=RTIS_Report.xls");
    PrintWriter out = null;
    out = response.getWriter();
    String report = request.getParameter("REPORT");
    JCO.Table lines = download(request, session, report);
    for (int i = 0; i < lines.getNumRows(); i++) {
         lines.setRow(i);
         String content = lines.getString("LINES") + "\n";
         out.write(content);
         out.flush();
    out.flush();
    out.close();

    Hi,
    I think you can use IWD Cached Web Resource to achieve this..
    See the below code FYI..
    public void downloadToExcel( )
        String fileName = "Customer" + ".xls";
         IWDCachedWebResource cachedExcelResource = null;
         try
              File f = new File("Customer.xls");
              WritableWorkbook workbook =   Workbook.createWorkbook(f);
              WritableFont black = new WritableFont(WritableFont.createFont("Trebuchet MS"),WritableFont.DEFAULT_POINT_SIZE,WritableFont.BOLD,false,UnderlineStyle.SINGLE,Colour.BLACK);
              WritableCellFormat blackFormat = new WritableCellFormat(black);
              WritableFont blue = new WritableFont(WritableFont.createFont("Trebuchet MS"),WritableFont.DEFAULT_POINT_SIZE,WritableFont.NO_BOLD,false,UnderlineStyle.NO_UNDERLINE,Colour.BLUE);
              WritableCellFormat blueFormat = new WritableCellFormat(blue);
              WritableSheet sheet = workbook.createSheet("Customer", 0);
                   Label label;
                   String[] header={"Corporate Code","Batch ID"};
                   for (int i=0;i<2;i++)
                        label = new Label(i,0,header<i>.toString(),blackFormat);
                        sheet.addCell(label);
                   WritableCellFormat integerFormat = new WritableCellFormat(NumberFormats.INTEGER);
                   jxl.write.Number number;
                   // Reading the contents
                   for(int i=0;i<wdContext.nodeVn_DownloadToExcel().size();i++)
                        String strCorpName = wdContext.currentContextElement().getVa_CorpCode();
                        String strBatchID =     wdContext.nodeVn_DownloadToExcel().getVn_DownloadToExcelElementAt(i).getVa_BatchID();
                        label = new Label(0,i+1,strCorpName,blueFormat);
                        sheet.addCell(label);
                        label = new Label(1,i+1,strBatchID,blueFormat);
                        sheet.addCell(label);
                   workbook.setColourRGB(Colour.LIME, 0xff, 0, 0);
                   workbook.write();
                   FileInputStream excelCSVFile = new FileInputStream(f);
                   IWDCachedWebResource cachedWebResource = null;
                   if (excelCSVFile!= null)
                        cachedWebResource = WDWebResource.getWebResource(excelCSVFile, WDWebResourceType.getWebResourceType("xls","application/ms-excel"));
                   cachedWebResource.setResourceName(fileName);
              cachedExcelResource = cachedWebResource;
              wdContext.currentContextElement().setVa_DownloadToExcel(cachedExcelResource.getURL());
              workbook.close();
         catch (Exception ex)
              wdComponentAPI.getMessageManager().reportException("Error in Excel Download"+ex.getMessage(),false);
    Regards,
    Vijay

  • Download excel file to PC in background

    Hi All,
    I need to write a report to local PC as an excel file. The program is working fine in foreground using cl_gui_frontend_services=>gui_download. However since the report data is very large, when the user runs the program in foreground, it always gets timeout. So it has to be run in background. I did a lot of research and tried the example posted here as well: http://abapblog.com/articles/tricks/33-create-xlsx-mhtml-file-from-internal-table-in-background
    But I am still not successful. I am getting ""control_flush_error". Does anybody have any ideas?
    Thanks,
    Meiying

    Hi ,
    cl_gui_frontend_services=>gui_download is for front end if you use this for background job scheduling it will throw dump !!
    so the solution is write a program to download the file to application  server using
    'OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE'
    and from there you can get the file.
    there is no way that you can schedule a program in background and store it on local PC.

Maybe you are looking for

  • Where is Adobe Photo 3.0?

    I accidently removed 3.0 thinkin 3.0.1 would be an up grade. All my pictures are in 3.0 and I can't access it. Although System Restore lists it as removed they say I can't restore because it wasn't. The pictures are around in various files, but I wan

  • External display only works with Macbook open?

    I have an Acer AL2623W which works fine as an additional or main screen, but a second after you close the laptop the screen goes blank and it shows an 'input not supported' error. The Macbook stays on, it just doesn't drive the monitor alone. Re-open

  • Hi this is Krishna Prasad,completed ABAP training,and i need some suggestin

    Hi, I completed my course on ABAP, and in search of job on ABAP, can anyone tell me the books required to prepare and the main objects to be known. if u people have any material please forward to my maild id,[email protected] Thanks, Krishna Prasad.

  • Dispatcher using 100% CPU with 4GB space "used"

    A short story with a happy ending ... A user tried to create a "big" table with a possibly somewhat cartesian select, resulting in the "oh no you don't: that would exceed 4GB" error/cancel scenario. They cancelled and went back to working on the few

  • Color Correction - In Premiere CS5 or After Effects CS5?????

    Hello I started this question in Premiere, but am now thinking that perhaps I should take advantage of the additional color correction tools in CS5 After Effects..... http://forums.adobe.com/thread/777459?tstart=0 If any one is interested in helping