How to send the data from jsp page to excel ???

hi all,
i want to send the data from my jsp form to excel sheet. any one can help me ??

Hope this sample code might help :
StringBuffer data = new StringBuffer();
OutputStream ostream = response.getOutputStream();
response.setContentType("application/vnd.ms-excel");
response.setHeader( "Content-Disposition",
"attachment; filename=sample.xls" );
ostream.write(data.toString().getBytes());
ostream.flush();
Try it out.
Swathi

Similar Messages

  • How to Hightlight the Data in Jsp Page

    How to Hightlight the Data in Jsp Page,
    I am doing doing search page,based on values given search page those are sent to servlet,in servlet based on some conditions if particuler id i am getting then i am redirecting to Respective jsp page with highlight the data from database..
    Thanks in advance...

    "Highlighting data in JSP sounds strange".
    Without looking at your search specific algorithms I feel you are finally going to display a page (HTML content) to user which contains highlighted text. Highlighting is not directly related to server side language you use (JSP, ASP, PHP etc.). This is purely HTML and CSS. However, server side script (such as JSP) should generate HTML content for getting highlight effect.
    Following HTML shows highlighted text using background-color property on span element.
    <html>
      <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
      </head>
      <body>
          <p style="font-size:1.1em">This is a long paragraph which contains <span style="background-color: yellow;">highlighted text</span> and non highlighted text.</p>
      </body>
    </html>Thanks,
    Mrityunjoy
    Edited by: mrityunjoy on 14 Jun, 2010 3:30 AM

  • How can we export the data from OAF Page to Excel instead of .csv or .txt

    Hello,
    How can we export the data from OAF Page to Excel instead of .csv or .txt
    When i click on the export button it is exporting to txt file, But i need to export the data into Excel by default
    Please help me
    Thanks in advance
    Thanks,
    Raju
    We have changed the below profile option to get the data in excel by default
    Profile Name Export MIME type
    Profile Code FND_EXPORT_MIME_TYPE+
    Existing Value: text/tab-separated-values+
    Change as: Excel
    Thank you,
    Raju
    Edited by: 1006649 on May 21, 2013 10:55 AM

    We have changed the below profile option to get the data in excel by default
    Profile Name Export MIME type
    Profile Code FND_EXPORT_MIME_TYPE+
    Existing Value: text/tab-separated-values+
    Change as: Excel
    Thank you,
    Raju

  • How to send the data from mac pc to External drive

    how to send the data from mac pc to External HDD
    or Pen Drive but with out deleting the preview as data

    You can use "Finder", which is in your dock, to copy files from your iMac folders over to the external hard drive.
    Hope this helps

  • How to load the data from flat file ( ex excel ) to Planning area directly

    Hi all ,
    How can i load thedata fro m flat file directly to Planning area .
    PLease help me in this.
    Regards,
    Chandu .

    download one key figure data from planning book ( interactive damand plan) and made some changes and need to upload the data back to same planning book
    But, may I know why you are thinking of downloading, changing and uploading for just changing the figures for a particular key figure. You can do it in the planning book itself.
    However, not all the key-figures can be changed. But, what type of key-figure  you are speaking here? Is it like 'Forecast' for which the value is based on other key-figures, or is like a key-figure where some manual adjustments are to be done--so that it can be manually edited? However,  in both the cases, the data can be changed in the planning book only. In first case, you can change the values of dependant key-figures and in the second case, you can change the key-figures directly.
    And please note that you can change the values of the key-figures only at the detailed level. So, after loading the data in the book, use drill-down option, maintain the data at the detailed level, change the figures, and automatically, this gets reflected at the higher level.
    In case you are unable to change the values, go to the 'Design' mode of the book, right-click your key-figure, under "Selected Rows", uncheck "Output Only" option. In case you are unable to see that option, then you are not authorised to change that. See if you can change the authorisations by going to the "Data View" tab in planning book configuration (/n/sapapo/sdp8b), and change the value of Status to 3.
    Hope your query is answered with different solutions offered by many of the sdn colleagues here.
    Regards,
    Guru Charan.

  • How to send a data from JSP to a lot of Swing clients?

    Hello,
    Can you recommend me how to do this?
    My idea is to run inside the APP server a Socket server, which i want to be started on APP server startup.
    Should i use MBean for that or there is any better way?
    Thank you for any hints and Kind regards,
    Chavdar

    I want adminitrator of a website to send data.
    Through submiting thoriugh JSP, servlet or whatever
    and sending it to Swing clients.
    Uh, no.
    So all the clients should listen for a new
    information from the server and updates accordingly.
    Uh, no.
    I.e i want to make callback from server to Swing
    clients. not just from Swing clients to server.
    I prefer to use only JDK1.6 api not J2ee api for the
    Swing clients.Uh, no.
    HTTP is stateless. By definition the server doesn't know who's there.
    There are ways around that, but they're ugly hacks (like opening ports from servlets, NOT recommended).
    Better have the clients poll the server at regular intervals.

  • How can i send the data from WD to SMARTFROMS to fill it?

    Hi All,
    how can i send the data from WD to SMARTFROMS to fill it?
    Best Regards

    Hello
    After conferring with a colleague, the following response may help:
    The Smart Form doesn't have any special integration in WebDynpro.
    Therefore the application should implement it especially.
    Steps:
    1) Call of Smart Forms in mode GET_OTF
    2) Convert OTF to PDF
         3) Show the PDF in WD Context Node
    Similar topic was discussed here:
    Re: Displaying Smartforms in Webdynpro ABAP
    Thanks
    Kind Regards
    Toros Aledjian
    Edited by: Toros Aledjian on Nov 29, 2010 8:43 AM

  • How to pass the data from a pop up window to the parent window

    Hi All,
    I have a jsp page which contains a add button, while clicking it a popup will come out(which is a another jsp page). There are some input fieldsand a submit button. Now how could I send the data from the pop up to the parent winow. Also I have to check that if the pop up is open and I click add button then another pop up must not open.
    Plz reply its urgent
    Thanks and Regards
    Rajib Sharma

    Thanks for the reply
    But it not worked
    I have a jsp page and the popup is also a jsp page the data that is passed from the popup window to the parent must be send to the server from the parent window to get a data from the data base as search result. Its of no use to get it as js data
    Thanks and regards
    Rajib Sharma

  • Sending binary data from JSP (1.1)

    Hi all:
    I am using Tomcat 3.2.1 and Apache under Linux Mandrake OS.
    I have a JSP (1.1) sending binary data (GIF, PDF, DOC ..) using response.getOutputStream().write(data)
    method.
    The problem is the precompiler automatically creates the JspWriter and puts some out.write("\r\n") lines
    before I use getOutputStream method. The JVM throws an IllegalStateException because I am using both
    methods (this is from Servlet 2.2 specification).
    Must I change my code to forwarding to a servlet that make this work or is there a simple solution to
    avoid this?
    Thanks in advance.
    J.
    null

    Hi Shreeharsha
    Please refer to below docs for sending data from JSP page to RFC. In which you need to use sap connectors for connecting to SAP backend system.
    http://help.sap.com/saphelp_nw04/helpdata/en/b6/55e3952a902447847066a0df27b0d6/content.htm
    Hope it helps
    Regards
    Arun

  • Exporting the datas from jsp to excel spreadsheet

    Hi:
    I would like to know how to publish the datas from a jsp page to an excel spreadsheet . Is there ay software I've to use or an API.
    and how to use it.
    Would appreciate the replies.
    Thanks.

    OK. Lets say you query a DB and get back a results set with 2 rows from a DB table where each row has 4 columns (all columns are string types). Here is some code that should give you the idea, note I didn't compile it so you'll have to work out the bugs.
    Example data:
    col1      col2       col3       col4
    a1           a2          a3          a4
    b1            b2          b3          b4
        public void printFile(ResultSet rs, File file) throws Exception {
            FileWriter fout = null;
            int index;
            final String DELIM = "\t";  // tab delimiter, use the character you prefer
            final String NL =  System.getProperty("line.separator", "\n")
            try {
                fout = new FileWriter(file);
                while (rs.next()) {
                      index = 1;
                      fout.write(rs.getString(index++) + DELIM + rs.getString(index++) + DELIM
                                       rs.getString(index++) + DELIM +rs.getString(index++) + NL);
            } catch(Exception e) {
                e.printStackTrace();
                throw e;
            } finally {
                try { fout.close(); } catch (Exception e) {} // do nothing

  • How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
    That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
    This page is a good starting point for learning about Flex and PHP communication:
    http://www.adobe.com/devnet/flex/flex_php.html
    Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • How to transfer the data from R/3  to APO

    Hi Gurus,
    How  to transfer the data from R/3  to APO.
    I do have 4    Ztables  in R/3  can I pass this Ztables data to APO when sales order is created in APO  .
    Thanks & Regard,
    Mohammed Ali.

    Welcome to SDN.
    refer this link
    creating integration model
    Give ur mail id i will send the document which i have.
    With regards.
    Maya.

  • How to send the data manually

    Hi Experts,
      I need small information.when messages are gone into queue state due to one message 
    When an EDI file came into wrong format and with that some messages are gone into queue state in MONI.
    if i cancel the first message then remaining all the messages are processing successfully.
    So from that cancel message i want sent the data manually as business needs that data.
    Can all please tell  me how to send the data manually with steps.
    Thanks in Advance.
    Bhaskar

    Hi,
    I think you are talking about QoS "EOIO", in which all messages are porcessed in FIFO order and whenever the preceeding message get stuck due to error in the queue, then all the messages are stoped. And yes as soon as you will cancel the message which went into error all the remaining messages will automatically will be delivered.
    In my opinion since QoS is EOIO then it will be not possible to sent the data mannually, you can do one thing, do not cancel the message. Try to correct the messge and then resend it.
    Regards,
    Sarvesh

  • My PC Harddrive died along with all the CD's that I have saved to the Itunes library.  My IPOD touch has the library still so I would like to send the data from the IPOD to the PC to restore my library.  Is this possible?

    My PC Harddrive died along with all the CD's that I have saved to the Itunes library.  My IPOD touch has the library still so I would like to send the data from the IPOD to the PC to restore my library.  Is this possible?

    Yes, by using a third-party utility such as Phone to PC or Phone to Mac.
    Also see How to dowload purchased music and Downloading past purchases from the App Store, iBookstore, and iTunes Store

Maybe you are looking for

  • Safari will not open a window when "open at login" is enabled

    I seem to be having this issue where I can't seem to get a Safari window to open at login. I've tried many many settings from disabling the pop-up blocker to application permissions, it just doesn't want to open a window upon login. The icon in the d

  • Strange problem while execution of query....

    Hi Friends I am facing a strange problem while executing the query. I have one query ,its old one ,till yesterday everday it was working fine , But today i am trying to execute that query ,execution process takes very long time ,finally no response f

  • Photos on DVD

    Hi Can't see any photos in lion DVD comes up as a blank DVD. Is there a fix for this yet as this should be a basic function, not a roadblock!

  • How to un-mute regions

    Hi, Working in Logic Express v.7.2.3 - Everything in my song was playing fine - must have accidentally hit something which muted all regions in an Audio Track I had laid down - now all the regions in that track are greyed-back and act as if they are

  • Unable to create server groups

    Hi All, I am unable to create server groups on Business Objects 3.1 Edge server. It has been updated till SP 4. I  get the following error "This operation is not permitted with your current set of license keys. Upgrade your license keys to enable thi