Download to file (.xls) problem

I am running my application in 2004s Environment. It is throwing ClassCastException with the below code. Class IWDModifiableBinaryType is deprecated. Is there any way i can get the same functionality.
IWDAttributeInfo mAttInfo =
          wdContext.getNodeInfo().getAttribute("DataSource");
IWDModifiableBinaryType mBinaryType =
     (IWDModifiableBinaryType) mAttInfo.getModifiableSimpleType();
Is there any ready to use functionality for this. Your answers are highly appreciated.
Regards,
Learner
Message was edited by:
        SAP Learner

Hi Learner!
What functionality do you need?
If you want to save a dynpro table to Excel file, look this blog:
/people/bertram.ganz/blog/2007/05/25/new-web-dynpro-java-tutorials--uploading-and-downloading-files-in-sap-netweaver-70
If you want to download Excel file from your database, see this thread, especially last post:
How to store files in database and get it from DB with WD application?
Hope it helps.
Regards, Lev

Similar Messages

  • Download ascii file procedure -problem as its getting binary after download

    Hi ,
    I have create a application that will download a file from a customised blob table by calling the procedure below which is as per oracle documentation:
    CREATE OR REPLACE PROCEDURE download_my_file(p_file IN NUMBER) AS
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(400);
    Lob_loc BLOB;
    BEGIN
    SELECT b.MIME_TYPE, a.file_content, a.file_name,A.file_size
    INTO v_mime,lob_loc,v_file_name,v_length
    FROM PCD_PROCESS_TBL a,PCD_CNTL_TBL b
    WHERE a.seq_no =p_file AND ROWNUM<2;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    owa_util.mime_header( NVL(v_mime,'text/plain'), FALSE,'ISO-8859-4' );
    -- set the size so the browser knows how much to download
    htp.p('Content-length: ' || v_length);
    -- the filename will be used by the browser if the users does a save as
    htp.p('Content-Disposition: attachment; filename="'||SUBSTR(v_file_name,INSTR(v_file_name,'/')+1)|| '"');
    -- close the headers
    owa_util.http_header_close;
    -- download the BLOB
    wpg_docload.download_file( Lob_loc );
    END download_my_file;
    The problem is that when our process updating the blob table with .dat file from Unix the data getting inserted fine.The file is basically a ascii file. But after downloading this by mime 'text/plain' or 'application/octet' i can see its getting as a binary file and it is not carriage return by a new line.A space like character getting inserted inside each line .
    can anybody please help out of that how can we get rid of this.
    I even change the blob to clob but still the problem persists even for clob the procedure not getting called.
    Thanks in advance,
    Deba

    Sounds like the problem you're having is the mismatch between the Unix text file format and the Windows text file format.
    Specifically, Unix uses LF (line feed) to denote the end of a line, while Windows uses CRLF (two characters, carriage return and line feed).
    If you open the file in Wordpad, you should see it ok.

  • Add Ons,Internet Explorer and downloading PDF files

    There is one website where I have an issue downloading some PDF files,I do not have problems on any other website,admin at problem website gets no other complaints.
    I use Adobe Reader 11.0.08.
    I discovered that if I DISABLE the ADD ON in Internet Explorer for Adobe Reader I can easily download all content from this problem website ,If I ENABLE ( my norml operation ) the ADD ON for Adobe Reader ,the PDF download problem appears again.
    What exactly is the ADD ON doing ? I'm under the inmpression that it ties software to a website ,so when I ask for a PDF file on a website, the website looks for Adobe Reader and the PDF file opens  ,using Adobe Reader . . . if I disable the ADD ON . . . doesn't the website NOT know how to give me the PDF file . . .  yet with the ADD ON Disabled this problem website downloads the PDF file using Adobe ( it said it is using Adobe ) with no problem ?
    Why ??
    This issue happens on two differnt PC's ??

    P.Willener,
    Thanks for response.
    The website is not public ,that I have PDF download issues using Adobe Reader 11.0.08. I have no PDF download issues on any other website with PDF files.
    On this problem site I can download some files, others I can't.
    The website admin gets no other complaints from other website users.
    I discovered that on a friends new PC ,this website works good and I can download all files, no problems.
    I have an older PC ( 2008 vintage )  ,it runs Windows 7 and IE 11 , with this PC I have PDF download issues on this website only , when the problem occurs the files stop and never complete downloading,  all recent website PDF  files download OK, older files do not ,on my PC   . . . but if I DISABLE the Adobe Reader ADD ON ,ALL files download with no problem, if I ENABLE the Adobe ADD ON ,I have problems.
    My question is . . . why ?  When the ADD ON for Adobe Reader is ENABLED what is different then when the ADD ON is DISABLED ,for Adobe Reader ?
    To me ,it seems that in the ENABLED mode ,the PDF file is opening within the IE browser ,using Adobe Reader , when the ADD ON is DISABLED the PDF file is opening in the External Reader mode , using Adobe Reader am I correct on this thinking ????
    So again why would I have issues on this one website only ?  Yes there is a work around but my normal way of operating is what the Adobe Reader ADD ON ENABLED.
    Any ideas what is going on ????  If you suspect the website any thoughts on what their problem could be ????   Again they get no other complaints ,I guess they all have new PC's.
    Al

  • Problem downloading a file from popup

    Hi,
    I have scenario like this.
    popup on a page.
    region on that popup. when i click on a button inside the region i want to close the popup and download a file of type excel.I am able to close the popup.but the problem is the download of file is not happening.I think when i hide the popup the response is coming back as the parent page.but i want to download the file.Is there any way i can achieve this?
    Here is the code for downloading and hiding the popup.closePopup method is being called from the action Listener of the button.
    public void closePopup(ActionEvent actionEvent) {
    // Add event code here...
    RichPopup parentpopup = getMyPopup(actionEvent.getComponent());
    parentpopup.hide();
    FacesContext facesContext = FacesContext.getCurrentInstance();
    PrintWriter pw= null;
    HttpServletResponse httpServletResponse =
    (HttpServletResponse)facesContext.getCurrentInstance().getExternalContext().getResponse();
    try {
    pw = httpServletResponse.getWriter();
    httpServletResponse.setContentType("application/vnd.ms-excel");
    httpServletResponse.setHeader("Content-disposition", "attachment; filename=" + "test");
    pw.write("test");
    pw.flush();
    pw.close();
    FacesContext.getCurrentInstance().responseComplete();
    } catch (Exception e) {
    e.printStackTrace();
    private RichPopup getMyPopup(UIComponent component){
    if(component ==null){
    return null;
    if(component instanceof RichPopup){
    return (RichPopup)component;
    return getMyPopup(component.getParent());
    please guide me here.

    use following code
        public void fileDownloadListener(FacesContext facesContext,
                                         OutputStream outputStream) {
            OutputStreamWriter outputStreamWrite =
                new OutputStreamWriter(outputStream);
            //PrintWriter pw = null;
            HttpServletResponse httpServletResponse =
                (HttpServletResponse)facesContext.getCurrentInstance().getExternalContext().getResponse();
            try {
                //pw = httpServletResponse.getWriter();
                httpServletResponse.setContentType("application/vnd.ms-excel");
                httpServletResponse.setHeader("Content-disposition",
                                              "attachment; filename=" + "test.xls");
                outputStreamWrite.write("test");
                outputStreamWrite.flush();
                outputStreamWrite.close();
                FacesContext.getCurrentInstance().responseComplete();
            } catch (Exception e) {
                e.printStackTrace();
        }

  • Downloading a file would bring up an option to open the file or save it - for some reason now it just downloads straight to the download folder. Why? Problem with Firefox or something else?

    Downloading a file would normally bring up an option to open the file with the appropriate program or save it - for some reason now it just downloads straight to the download folder. Why? Problem with Firefox or something else? It's very frustrating - sometimes you want the file opened first so it can be discarded or saved to a different location.

    Hey. that's great! Thanks for posting back with the outcome.

  • Problem on windows xp with downloaded zip file

    Hi,
    I have written a JSP to download file which is as follows
    try
    response.setContentType("application/download");
    response.setHeader("Content-Disposition","attachment;filename=<FileName>");
    int iRead;
    FileInputStream stream = null;
    try
    File f = new File(<FilePath>);
    stream = new FileInputStream(f);
    while ((iRead = stream.read()) != -1)
    out.write(iRead);
    out.flush();
    finally
    if (stream != null)
    stream.close();
    catch(Exception e)
    //out.println("Exception : "+e);
    After downloading zip file, could not extract files on windows XP by using any tool or built-in extractor i.e. compressed(zipped)folders (error: compressed folder invalid or corrupted).
    But this works on win2k or win98
    How can i work with it or can anyone tell me a solution to handle such a problem.
    Thanks in advance.
    Rajesh
    [email protected]

    This could be a problem with the built-in ZIP program in Win XP - it's possible that the ZIP you are downloading (uploading?) is simply incompatible with the XP program. In Win 98 & 2000, you would have to use your own ZIP program, e.g. Winzip, and that can handle more formats that the XP program.
    Try installing the same ZIP program that you have on w98/2k on your XP machine, and see if you can open the uploaded file using it.

  • I am having problems downloading files from the web. After a number of files are downloaded, the system become sluggish, and then hangs. I traced the problem to the download history file: downloads.sqlite.

    After downloading a number of 1.0 MB files, the system became very sluggish, and I started to get lots of (Not Responding) messages when trying to download or just use Firefox for browsing. Using Performance Monitor, I observed that the Firefox executable was growing larger and larger - up to as large as 1.2 GB on a system with 2.0 GB memory. Page faults were off the chart.
    Looking for a similar problem, I found one that discussed the downloads.sqlite file becoming corrupted. I first noticed that this file was over 600 MB in size, so I deleted it. I then downloaded additional files, and observed that the new downloads.sqlite file would increase in size by about 150% of the size of each file that was downloaded. Once it would get up to 500 MB in size, the system started slowing down again.
    I don't know the purpose of this file, but it appears that it keeps a full copy of every file downloaded, which may be the function of a download history file, but it does not seem correct that the file should grow in size without limit, and thus impact the system.
    I would also appear that the Firefox executable is trying to read the entire contents of this file each time a new file is downloaded, which does not seem right.
    Temporary fix is to periodically delete the downloads.sqlite file when it gets too large and starts impacting performance.. Apparently it is smart enough to open a new file if the old one is not found. I am not sure what the correct behavior for this file should be. Apparently is does not re-initialize when a new Firefox session is initiated.
    Please feel free to contact me if more information is desired. I'm not sure what details you might need to troubleshoot this type of problem.

    Hi Katy, and a warm welcome to the forums!
    What is the exact name of the file?
    Is it aim.bin?
    Which requires either Stuffit Expander, or the Unarchiver to deflate.
    http://www.apple.com/downloads/macosx/systemdiskutilities/theunarchiver.html

  • Problem downloading a file via http

    Hi
    I'm just getting started with WLS (sp5) and am having a problem downloading
    a file via http. The document is stored in the main html docs directory and
    whenever I link to it or try to download it directly (eg:
    http://<host>:<port>/myfile.doc) I get the following error in a message box:
    Your current security settings do not allow this file to be downloaded.
    Can anyone point me in the right direction as to where I grant permissions
    to do this - I've tried using the weblogic.security.URLAclFile and adding
    the directory as a weblogic.io.fileSystem (a desperation move, I know).
    Thanks in advance,
    Peter Villiers

    PLEASE IGNORE THIS POST
    The problem was caused by someone (me though I honestly don't remember doing
    it), setting the content security level to high in my web browser which
    stopped this type of download.
    Peter

  • I am having a problem when downloading a file. What can I do?

    Today (April 8, 2011) when I tried to download a file (.zip) firefox froze. When firefox got to the download window (i.e where you choose to save the file onto you computer) it froze. It wouldn't save the file, nor would it let me close the download window and cancel the download. This has happen twice this year. I had to force quit the program. I am on the latest version of Mac OS X and firefox 3.6.16.

    See this article: [[Firefox Hangs]]
    ''<hr>Note: If anyone's reply has solved your problem, then please mark that reply as "Solved It" to the right of that reply after logging in your account. It will help us to concentrate on new questions.''

  • Problem file xls with jasper (source code mixed in the content XLS file)

    i´m writing xls file with jasper, the problem is that is mixed the source code of the JSP (where doing request) in the content of the file xls, do not import the API thah use.
    The java code whit JASPER is like:
    FacesContext ctx = FacesContext.getCurrentInstance();
    ExternalContext ectx = ctx.getExternalContext();
    JRDataSource dataSource = ......
    InputStream inputStream = ectx.getResourceAsStream(parametro);
    JasperReport jasperReport = (JasperReport) JRLoader.loadObject(inputStream);
    JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,new HashMap(), dataSource);
    JRXlsExporter exporter = new JRXlsExporter();
    ByteArrayOutputStream xlsReport = new ByteArrayOutputStream();
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
    exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, xlsReport);
    exporter.exportReport();
    byte[] bytes2 = xlsReport.toByteArray();
    response.setContentType("application/vnd.ms-excel");
    response.setContentLength(bytes2.length);
    response.setHeader("Content-disposition", "attachment; filename="" + "MI_EXCEL_JR" + ".xls"");
    ServletOutputStream outputStream = response.getOutputStream();
    outputStream.write(bytes2, 0, bytes2.length);
    outputStream.flush();
    outputStream.close(); whay is printed the response in the xml file?
    tnk for your help....

    hoham wrote:
    byte[] bytes2 = xlsReport.toByteArray();
    Not related to the actual problem, but this line is not very efficient. What if the report is bigger than the available server memory? Or if there are many simultaneous requests which does all the same?
    It would result in an OutOfMemoryError. Rather obtain it as an InputStream and write it in a loop to the OutputStream using a byte block as buffer. Or wrap the both streams by BufferedInputStream/BufferedOutputStream and write in a simple loop. Consult the basic Java IO tutorials for details and code examples.

  • HT203200 has anyone ever had this problem? seems to be a problem in itunes, as i am having no problems downloading other files."There was a problem downloading "Outlander / Howard McCain". An unknown error occurred (-50)."

    has anyone ever had this problem? seems to be a problem in itunes, as i am having no problems downloading other files."There was a problem downloading “Outlander / Howard McCain”. An unknown error occurred (-50)."
    kinda suck to pay for something you cant use!..

    Try fixing up the validation issues...
    http://www.feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.stereogol.com%2Faudi o%2Fwimpy_podcast.php
    Not promising it will help, but it's worth a shot.

  • I can not do the update , what should I do to fix this error ? "There was a problem with downloading the file . For tips on troubleshooting , please go to Customer Support . ( Error code : 204 ) ." thanks

    I can not do the update , what should I do to fix this error ?
    "There was a problem with downloading the file . For tips on troubleshooting , please go to Customer Support . ( Error code : 204 ) ." thanks

    Hi,
    Please refer to the help document below:
    Error downloading, installing, or updating Creative Cloud applications
    Regards,
    Sheena

  • SetHeader problem when user downloads a file from a server

    Hi everyone,
    I have a question about the way to let a user download a file. A created a jsp that handles the download. This is the code:
    <%@ page import="java.io.*" %><%
        response.setHeader("Content-Disposition", "attachment; filename=" + session.getAttribute("executedCommand").toString());
        response.setContentType("text/csv");
        int iRead;
        FileInputStream stream = null;
        try {
            File f = new File(session.getAttribute("executedCommand").toString());
            stream = new FileInputStream(f);
            while ((iRead = stream.read()) != -1) {
                out.write(iRead);
            out.flush();
        }finally {
            if (stream != null) {
                stream.close();
    %>When I run this, I get a download window, so that the right file can be downloaded, but I would like the application to show me the name of that file in the download window and in my save dialog, and that's something I haven't managed to do yet, because I always get the name of the servlet (that redirects to the jsp page). So the problem is, the right file is downloaded but it's name is never shown in the download window. How can I resolve that?
    Thanks for your help!
    E_J

    I forgot to say that my session variable contains the absolute path of the file the user can download. Maybe using session variables is not the best solution in this case, but it should have to work, shouldn't it?
    Still waiting for some help. I really appreciate it...
    E_J

  • PDF PROBLEMS!  Not able to download PDF files into Safari anymore?!?

    I was always able to download PDF files into Adobe Reader from the internet. I can't download them anymore...My MacBook keeps trying to load and reload the page, but never does it. I downloaded the most recent Adobe Reader 9, but this did not fix the problem. I can open PDF files I have saved, but can' t download them in Safari. Any ideas? Thanks-

    Hi Jes,
    I get an error message saying
    "The page cannot be found"
    infact when i hover the mouse over the link i am able to see the correct path and the correct correct values as follows
    schema.procedure?V=04&C=001
    but when i click on it, i get the error as above.
    i am not sure whether it is any permissions issue in linux. or is the procedure not getting executed properly at all.
    but iam able to read those pdfs and insert them into an oracle table.
    but just not able to download them back again.
    but exactly the same code and same tables etc work in windows.
    Thanks,
    Philip.

  • Can't download pdf and xls file

    Hi, I want to download an attachment from my gmail .When I clicked to download, it will go to icloud.com and displayed like this."Your file will begin downloading automatically.Don't see it? Try again>
    The attachment contains both pdf and xls files.
    I have tried many times.
    Please help me.

    Hi amusa123,
    I don't get it. So let me try to explain again what you are describing:
    - You open a mail in Gmail (I guess Gmail in the browser, right?)
    - This email has an attachment (a excel sheet, right?)
    - You try to open the file, which immediately starts downloading the file to your Mac (usually the file gets downloaded into the Downloads folder)
    What I don't get, where do you receive a message regarding icloud.com?
    With kind regards,
    David

Maybe you are looking for

  • Cannot install desktop manager on windows 7 64bit

    hi, unfortunately i am not able to installa the Desktop Manager 6.1.0 B38 Multilanguage on a pc having windows 7 - 64 bits, i already installed it on another pc with windows 7 - 32 bit and it worked. please tell me how to solve this problem. regards

  • How do you create your own short on the homescreen to email account?

    I've posted several threads and questions on here, mostly because I am looking at moving from a Blackberry to an iPhone. Friends have said managing multiple email accounts is easier on the iP than BB.  I fail to see how.  But here's how it might work

  • In Range and Coerce, STRING

    Hola a todo el mundo, La funcion "In Range and Coerce" para cadenas de caracteres, tiene un comportamiento que no acabo de entender. Si mi limite superior es z y mi limite inferior es a, si pongo d obtengo un PASS. Hasta aquí todo correcto. ¿Por qué

  • Adobe Reader Page Prints in almost all black

    Has any one ever experienced this. Not sure if there is setting that causes this or why it happens. Any advice? Using dell computer with windows xp pro

  • Unable To Restore Factory Defaults.

    Hi... I am not being able to reset Flash Professional CS5 to factory defaults, I have tried the Ctrl+Shift+AltKey Combination before starting the app but it does not do anything.Although on Photoshop CS5 there is no problem in doing so. By the way I