How to display a file (.doc, .xls, .ppt, ...) ?

I need to display a word document or an excel document?
How can can I do it ??
Thanks for any help !!

you can use the JEditorPane class to display the content!

Similar Messages

  • How to attach a .doc/.xls/.ppt file stored on the iPhone

    While Apple is making patches and updates for the Iphone... it seems they havent come out yet with a solution to solve the day to day problems of the Business
    users.
    I'm using the Iphone 5 for last 6 months.. but i'm still not a able to find a solution to do a simple task of attaching a .doc/.xls/.ppt file which is stored on my iPhone. Why it cant be made simple like other handsets and OS. Its so frustrating while traveling that if i have to send an attachment over a mail thread it can not be done in s simple attach file option. A complete new mail thread has to be started just to send a simple file. I think its high time that Apple really address the business needs which are logical to be there in such a supposedly high tech phone.
    I hope Apple is listening.. mean while if some has a solution please share.... really Important.
    regards,
    Business User

    This is a user-to-user technical support forum. You can leave feedback here: http://www.apple.com/feedback/
    If you are using Gmail or iCloud mail, a combination of the apps Mailbox and Dropbox work nicely. If it is a company MS Exchange deployement, Mail+ for Outlook will do the same with DropBox or Box (plus gives you your mail, tasks, and calendar in one app).

  • How to display RTF file and .doc file in JTextPane

    How to display RTF file and .doc file in JTextPane??

    Duplicate post
    http://forum.java.sun.com/thread.jsp?forum=57&thread=567029&tstart=0&trange=30

  • I could not able to open a .doc,.xls,.ppt inside the iframe tag in IE7.

    Hi all,
    I could not able to open a .doc,.xls,.ppt inside the iframe tag in IE7.
    what should i do?

    Hi,
    Question is,: when ever i call the .doc,.ppt,.xls files are not coming inside the iframe tag in IE7
    I am keeping the all files in separate storage area lik d:/StorageLoc/Docs/Sample.doc
    when ever i am calling the sample.doc through web,
    http://localhost:8080/VContext/OpenFile
    i am accessing the word,ppt,xsl files inside iframe
    like
    var fils= "d:/StorageLoc/Docs/Sample.doc";
    <iframe src="/VContext/OpenFile?r2=fils"></iframe>
    OpenFile.java [servlet file]
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException
    try
    String s2 = request.getParameter("r2");
    String s3 = null;
    String s4 = "txt";
    if(s3 != null && s3.equals("download"))
    response.setHeader("Content-disposition", "attachment;filename=output." + s4);
    if(s4 != null && s4.equals("pps"))
    response.setContentType("application/vnd.ms-powerpoint");
    if(s4 != null && s4.equals("doc"))
    response.setContentType("application/vnd.word");
    if(s4 != null && s4.equals("tif"))
    response.setContentType("image/tif");
    }else
    response.setHeader("Content-disposition", "inline;");
    if(s4 != null && s4.equals("pdf"))
    response.setContentType("application/pdf");
    else
    response.setContentType("application/octet-stream");
    try
    javax.servlet.ServletOutputStream servletoutputstream = response.getOutputStream();
    File fileFound = new File(s1 + s2);
    if(!fileFound.exists())
    s2 = "Photos/notfound.gif";
    FileInputStream fileinputstream = new FileInputStream(s1 + s2);
    ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
    byte abyte0[] = new byte[0x500000];
    do
    int i = fileinputstream.read(abyte0);
    if(i != -1)
    bytearrayoutputstream.write(abyte0, 0, i);
    } else
    byte abyte1[] = bytearrayoutputstream.toByteArray();
    response.setContentLength(abyte1.length);
    servletoutputstream.write(abyte1, 0, abyte1.length);
    servletoutputstream.flush();
    servletoutputstream.close();
    return;
    } while(true);
    catch(Exception e)
    System.out.println("IGST-INFO:" + e.getMessage());
    e.printStackTrace();
    }

  • How to display Pdf file in iPad site

    Hi
    How to display Pdf file in web page which can able to view in iPad safari?
    Thanks,
    Arun

    You can't really.
    You need to use DHTML in the swf-wrapper HTML file, usually a
    division wrapped iFrame, and load the PDF into the iFrame as an
    overlay to the Flash.

  • How to display the file status in the status bar?

    Hi all,
    Can anyone tell me how to display the file status in the status bar?
    The file status can consists: the type of the file, the size of the file etc..
    thanx alot..

        class StatusBar extends JComponent {
              JLabel l = new JLabel("ready");
            public StatusBar() {
                  super();
                  setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
                  add(l);
              public void setText( String prompt ) {
                   l.setText(prompt);
                   setVisible( true );
            public void paint(Graphics g) {
                  super.paint(g);
        }

  • How to display flash file in adf pages

    how to display flash file in adf pages need help

    Thanks all,
    It is resolved.
    the code i am using to display a flash is below.
    <f:verbatim>
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version
    =10,0,0,0" width="300" height="300" id="11gR1_aniH_grey" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="allowFullScreen" value="false" />
    <param name="wmode" value="transparent" />
    <param name="movie" value="mx2004demo.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#4d5c64" />     
    <embed src="../Images/mx2004demo.swf" quality="high" width="300" height="300" name="mx2004demo.swf" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false"
    type="application/x-shockwave-flash" wmode="transparent"
    pluginspage="http://www.adobe.com/go/getflashplayer" />
         </object>
    </f:verbatim>

  • How to display XSL file to ASPX in dreamweaver

    Hi,
    Just wondering how to display XSL file in ASPX page?
    I normally do it in ASP page by using server behaviour XSLT transformation and bind it to ASP page and this works very well.
    Now I am trying to use the same method and using ASPX page this time but this time there is no option from server behaviour where I can bind it to my ASPX.
    Can someone help or perhaps let me know where I can find the information how to do it?
    Thanks,
    Rush O

    You mean you want to see the XML source?
    You need to replace the characters '<' and '&' with corresponding entities '&lt;' and '&amp;'. You can use replaceAll, but do the ampersands first.
    Then I suggest you probably want to put them in a <PRE> block.

  • Display documents (jpg,doc,tff,ppt,pps,xls,pdf etc) in web dynpro

    Hi experts,
                    I have a requirement to upload the document of any type (jpg,doc,tff,ppt,pps,xls,pdf etc)  to a Z table (may be in a binary format) in a web dynpro application.
    I think this can be achieved through Fileupload view element.
    In another  window, I need to display the document based on what is selected in the table row. Which control or method can display any type of document?  As far as I know, the office control view element can only display documents of type (.doc and .xls).
    Please provide pointers on this or any example will help me.
    Thanks,
    AmitJain

    Abhimanyu,
                  Thanks for the reply. Wonderful it worked like a miracle.
    Awarded full points.
    Thanks
    Code I used in the action:  onactionclick
    METHOD onactionclick .
      DATA: content TYPE xstring.
      DATA:  lr_context_view_node          TYPE REF TO if_wd_context_node.
      wd_context->get_attribute(
          EXPORTING
            name =  `PDF`
          IMPORTING
            value = content ).
      CALL METHOD cl_wd_runtime_services=>attach_file_to_response
        EXPORTING
          i_filename      = 'Default_pdf.pdf'
          i_content       =   content
          i_mime_type     =   'pdf'
         i_in_new_window = ABAP_FALSE
         i_inplace       = ABAP_FALSE
    ENDMETHOD.
    Edited by: Amit Jain on Apr 2, 2009 5:46 PM

  • How to display the file contents???

    Hi all,
    I have a JSP page which is suppose to display resource contents on clicking of href like this:
    <td><a href="">Click here</td>But the problem is, these contents are stored some where on the hard disk of the system inside the folder \\LMS\Resources\doc\knowledge.doc.
    some other file I have like:
    \\LMS\Resources\pdf\display.pdf
    It can be any file (PDF,DOC,SOUND AUDIO).
    Can anyone please tell me how to open the contents of the file directly from href???
    Or I should use some other way to display those files.??I just want a way to start with.......
    Thanks in advance
    Namrata

    Hello Namrata,
    There are millions of ways to do this.
    1. You can create a shared drive in your server as "\\LMS\Resources" pointing to K Drive etc... You can write a simple servlet which picks up the relative path from "\\LMS\Resources" which is "pdf\display.pdf" and it can read the file and then based on the file extension it can resend the response mime type for the browser to pick it up. This can be done in both Windows and Unix environments.
    2. Have a Content Management System like Lotus Domino, Fatwire, etc and upload all contents and point the href to the Content Management System URL.
    3. You can upload the documents into a database as BLOB data and then use it to render content.
    4. You can also have a regular program which synchronizes the data from \\LMS into the Server hardware in a particular location.
    In Options 1, 3, 4 you need the servlet to render the content out to the Client browser.
    All this can be done based on the Technology environment, cost available to spend, Skill sets available and other factors.
    Do let me know if you need any more information
    Thanks,
    Pazhanikanthan. P

  • How to display PDF file in OAF page

    Hi All,
    I have an requirement to display a PDF file in OAF page. The PDF file will be stored in custom location in unixbox and when the user clicks on the hyperlink from OAF page, the PDF file should be promted to open or save the file in the local system.
    The pdf file will be stored in $XBOL_TOP and I am not sure on how to link the file directory path from OAF page.
    Please share some information on how to achieve this logic.
    Regards,
    Ram

    Hi,
    Did you find a way to do this.
    Please advise.
    Thanks
    Krishna
    Edited by: user452458 on May 11, 2010 6:53 PM

  • How to display pdf file in windows phone 8 silver light application?

    Hi,
    I am developing windows phone 8 silver light application . For my app I want to display pdf files . Is there any default controls to display pdf files ?
    I don't want to display using launchers , I want to display with in the app.
    any help,
    Thanks..
    Suresh.M

    Probably this should give you a fair idea : How to view PDF file inside an Windows Phone application?
    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

  • How to display text file in JSP?

    Hi,
    I am new to servlet/JSP/java programming.
    I have been able to download a file using ftp. I dont know who to display it in JSP.
    Here is my code. Any help will be appreciated...
    <%@ page import="java.util.*" %>
    <%@ page import="java.lang.*" %>
    <%@ page import="java.net.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="com.dmhistory.*" %>
    <html>
    <head>
    <title>Untitled</title>
    </head>
    <body>
    <%
    byte[] bytes = new byte[4096];
    URL theUrl = new URL("ftp://user:passwd@host/migr/Movers_for_Ora8/BG/logs/FLD-PAC3-20020311.log");
    BufferedInputStream in = new BufferedInputStream(theUrl.openStream());
    BufferedOutputStream outstream = new BufferedOutputStream(new FileOutputStream( new File( "D:/temp/log.txt" )));
    int pos = in.read( bytes );
    while ( pos != -1) {
    outstream.write( bytes, 0, pos );
    pos = in.read( bytes );
    %>
    <%
    in.close();
    %>
    DONE!!!
    </body>
    </html>
    How can i display this downloaded file in the browser?
    I want to display it in the original format i.e which new line and carriage returns...line by line..
    Thanks,

    Hi,
    I finally go it to display. but now I have new problem. The browser shows the text without the /n/r.
    But when I view the source using 'view->source', if see that the text has got proper format with newline and carriage returns.
    Any ideas how to display it correctly in the browser?
    <%
                   URL theUrl = new URL("ftp://user:pwd@host/migr/Movers_for_Ora8/BG/logs/FLD-PAC3-20020311.log");
                   //URL theUrl = new URL("ftp://dbcmaint:[email protected]/migr/Movers_for_Ora8/SNP/logs/SNP-PAC2-20020314.log");
                   URLConnection uc = theUrl.openConnection();
                   InputStream content = uc.getInputStream();
                   BufferedInputStream in = new BufferedInputStream (content);
                   LineNumberReader lnr = new LineNumberReader (new InputStreamReader (in));
                   String tempStr = "";
                   String str = "";
                   while ((tempStr = lnr.readLine()) != null) {
                   str += (tempStr);
                        %>
                        <%=tempStr%>
                        <%tempStr = "";
                        %>
                   <%
                   in.close();
                   lnr.close();
              %>
    Thanks

  • How to display HTML file from Unix server on UI at runtime

    Hi Experts,
    My requirement is to display  HTML files,  related to some particular person, on UI. The file is existing on a separate UNIX server and a file related to one person may have a lot of attached files as well , as is the case generally with HTML files, including pictures etc. So it is no use transferring file on my CRM system, as the files are kept separately on this UNIX server which is particularly for this kind of storage.
    I am able to show files residing on MIME repository ( I created some new HTML files )  of my CRM system on UI. but I don't know how to go ahead with this particular requirement.
    One idea is that I can map one folder of my application server to that unix server so that I can see the HTML files in this particular folder. but I don't know how to map MIME repository folder to application server directory or directly to the UNIX server .
    Please advise. Is my approach correct or is there any other way ?
    thanks in advance.
    Regards,
    Vikas

    Maybe this is too simple, but have you got an HTTP server on the UNIX machine? You could simply link the URL into you CRM application and display the contents directly from UNIX.
    cheers Carsten

  • How to display the file name & status when copying files.

    I write a program to backup/copy data from one directory to other directory, and I'm using File List and Runtime.getRuntime().exec("xcopy "+dir1+"\\"+name+" "+dir2+" /y");
    to copy the files, so it will copy the file one by one, and everytime one file is copied, I want to display the result to the screen, but guess what has happened, the screen just display a blank screen, and wait until all the copying processes finish, then it will display all files that has been copied.
    Appreciate your expertise to check my coding below.
    String[] fileList = fbackupSource.list();
    boolean done=true;
    JTextArea backupText = new JTextArea();
    JScrollPane backupScroll = new JScrollPane(backupText,
    ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
    ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    JFrame backupWindow = new JFrame("Backup Data");
    backupWindow.setBounds(320,240,400,330);
    backupWindow.getContentPane().add(backupScroll);          
    backupText.setText("Copy files from "+backupSource.toUpperCase()+" to "+backupDest.toUpperCase()+" : \n\n");
    backupWindow.show();
    for (int i=0; i < fileList.length; i++) {                     
    backupText.append(" ("+ i +")... processing " + fileList);
    done = copyFile(fileList[i],backupSource,backupDest);
    if (done=true) {
    backupText.append(" -> done. \n");
    else {
    backupText.append(" -> fail! \n");
    boolean copyFile(String name, String dir1, String dir2) {
    try {
    java.lang.Process proc =
    Runtime.getRuntime().exec("xcopy "+dir1+"\\"+name+" "+dir2+" /y");
    proc.waitFor();
    return true;
    catch (IOException e) {
    return false;
    catch (InterruptedException e) {
    return false;

    Oops, sorry, I should have written "Process.getInputStream()". Here's an example from:
    http://javafaq.nu/tips/opsys/index.shtml
    ==============
    How can I pass a string to the command line(DOS) ? Also i want to capture the output given by the command line in a string.
    Answer: Try this out:
    // works for DOS
    String cmds[] = new String[2];
    cmds[0] = "dir"; // replace with "ls" on UNIX
    cmds[1] = "c:"; // replace with "/" on UNIX
    // execute the command
    Process pro = Runtime.getRuntime().exec(cmds);
    // wait until it's done executing
    pro.waitFor();
    // what did the process output from the Input pipe back to
    // this process (okay, who named this stuff)?
    InputStream out = pro.getInputStream();
    // output it (really slowly)
    int i;
    while ((i = out.read()) != -1) System.out.println((char) i);==============
    Although I don't think this example will do exactly what you want... you might have to delete the waitFor() call and just check to see when there's nothing else to read from the InputStream. It's a start, though, and the web page has a lot of similar examples of this sort of thing.
    Yours,
    Tom

Maybe you are looking for

  • How do i transfer mailboxes from one computer to another

    Just trying to copy my mailboxes from my laptop to my G5 tower. Both on os10.5 and going from macmail to macmail. I tried to find out where the file lives as far as the mailbaoxes but no luck. Any info would be great. Thanks, Jeff    

  • My iphone 4 will no longer turn on

    My phone was working fine all morning and I had at least 25% battery life remaining.  When I picked it up to use it, and pressed the bottom button to wake it up, it would not wake up from sleep mode.  I assumed maybe the battery had drained so I plug

  • Help! Adobe Media Encoder disappeared from my Creative Cloud

    2 issues. #1. Was using Adobe Media Encoder (part of my creative cloud subscription) .. it kept saying i needed to activate it all of a sudden.. so (am on a mac) dragged it to trash, and went to adobe application manager to re-install, all of a sudde

  • HT4623 I have I pad i need flash player

    I have I pad not working Facebook any video or songs , I need flash player , what I do help me plz

  • DW8 templates won't display in Live View

    I have several sites that I've developed around templates distributed with Dreamweaver 8. When I access these with Dreamweaver CS4, everything works well in code and design view, but java script and images don't seem to display correctly in Live View