Exporting into Excell format using JSP or Servlet

Dear All
Could anyone please give me a little suggestion on my project?
I want to export the reports into MS Excell format from Servlet or JSP Page. Which one is effective and pls give some tips and sample code.
With uncountable THANKS : )
Ananth.P

Hi
I read about it in book Coreservlets and JSP pages author Marty Hall
link : http://www.coreservlets.com/
You can use content-type for excel and data which you want export to Excel place in HTML table or separete tab characters.
My english is poor. I hope that You understand me.
link:
http://archive.coreservlets.com/JSP-Code/Excel.jsp

Similar Messages

  • How to Export SSRS report into Excel format using query string

    Hello all,
    I am new to SSRS world.
    Last night i was trying to add a hyperlink  on the SSRS report (.rdl) file, by clicking which we can export the report into "Excel" format, but with no luck.
    Can anybody tell me how to form the hyperlink, so that we can export the report with its current content ( I mean the report content generated by selecting some parameter values)

    Hi Suman85,
    Based on your scenario, you want to add a link on the SSRS report file, and then click it you can export the report into “Excel” format.
    Just as kishan1901 said , you can add a textbox to your report and type in the words “Click here and export the report
    to excel” .Then right-click the textbox and select Properties. Switch to Navigation tab, click the radiobutton of ‘Jump to URL’ and type in the expression ,here is just a example:
     ="http://vyof1884200/ReportServer$youhoo?/My+Adventure+Works/Product+Sales+and+Profitability+by+Month&rs:Command=Render&rs:Format=excel"
    Then preview the report ,you will see
    Click here and export the report to excel 
    when you move the mouse to it ,the mouse will become a hand ,then left-click, it will jump out a dialog box to indicate user whether the excel file should be saved , opened or canceled. 
    I think this is what you want, if you have any further requirement, could you please describe it in more detail? We would give you some resolution or workaround.
    Regards,
    Challen Foo

  • In new Numbers, can you export a file into excel format?

    In new Numbers, can you export a file into excel format? Or is this something else thats been removed!!??
    HELP!!

    Hi AMGracie,
    In Numbers 3.0 on a MacBook Pro running OS X 10.9
    Regards,
    Ian.

  • Export to excel formatting

    I'm working on a quote report which has narrative sections as well as a table. I can get the report to look great in the application but it has formatting problems once exported to excel.
    In one of my narrative reports I have a simple table with a few columns. Once exported to excel the first narrative column is the entire width of the report table below it. The large cell row is also merged cells in excel.
    Is there anything that can be done to help force how the report goes into excel?
    I have also tried creating the report in a narrative html table to export into excel.

    Can someone explain if they face similar issues as I am when you export a report output on portal to Excel it takes huge size. I assume it because of all the color formatting etc. but is there a way to reduce this size. 3.5 Bex Analyzer same report takes only 3 MB while if I export it from portals it takes 32 MB.

  • Reports exported to Excel - Formatting issues

    We have two Business Objects Enterprise servers (boxi r2 and boxi r3.1 sp3) running side by side.  We find that reports created using boxi r2 and exported to Excel format look fine.  When we run the same report and export to excel using boxi r3.1 sp3, we encounter the following formatting issues:
    <ol>
    <li>All columns do not fit on pages.  The last 2 to 3 columns spill over onto extra pages.</li>
    <li>There are some columns where most of the values are blank, but when a row is exported that has a value in that column, all subsequent column positions for that row shift.</li>
    <li>All rows do not fit on page.  The last two rows flow onto a new page, then there seems to be a page break.</li>
    <li>On some reports dates are displayed as ######.</li>
    <li>On some reports column headings are  not centered.</li>
    <li>I would appreciate any input that would help us determine a fix for the formatting issues we are encountering.</li>
    </ol>
    The report is executed using CrystalDecisions.CrystalReports.Engine.
    Here is the code from the application that does the export:
                                ExportOptions exportOptions = new ExportOptions();
                                exportOptions.ExportFormatType = ExportFormatType.Excel;
                                exportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
                                DiskFileDestinationOptions diskOptions = new DiskFileDestinationOptions();
                                diskOptions.DiskFileName = filename + ".xls";;
                                exportOptions.ExportDestinationOptions = diskOptions;
                                ExcelFormatOptions XLOptions = new ExcelFormatOptions();
                                XLOptions.ExportPageBreaksForEachPage = true;
                                XLOptions.ExportPageHeadersAndFooters = ExportPageAreaKind.OnEachPage;                           
                                exportOptions.ExportFormatOptions = XLOptions;
                                rptDoc.Export(exportOptions);
    Please note the following details about our environment:
    <h5>Report Designers:</h5>CR Designer version:  xi Rel 2
    <h5>Developer environment</h5>Has the following installed:
    - Business Objects Enterprise XI Release 2
    - VS .Net  2008
    - Crystal reports Basic for Visual Studio 2008
    - Crystal Report 2008 Runtime SP3
    - Boxi .Net SDK
    - SAP BusinessObjects Enterprise XI 3.1 Client Tools sp3
    - .Net Version:  2.0
    <h5>Crystal Server environment:</h5>Two clustered  Business Objects Enterprise servers with the following installed & configured
    - Business Objects Enterprise XI Release 2
    - Crystal Reports XI Release 2
    - SAP BusinessObjects Enterprise XI 3.1 SP3
    - .Net Version:  2.0
    <h5>Web Servers:</h5>Two load balanced web servers with the following installed and configured
    - Business Objects Enterprise XI Release 2
    - Crystal Report 2008 Runtime SP3
    - Crystal Reports XI Release 2 .Net 2005 Server
    - SAP BusinessObjects Enterprise XI 3.1 SP3
    - .Net Version:  2.0

    Umm, the code you provided has nothing to do with Business Objects Enterprise...(?). So, I'm a bit confused by the mention of BOE and "The report is executed using CrystalDecisions.CrystalReports.Engine" in essentially one paragraph.
    Can you pls explain?
    - Ludek

  • Exporting Into Excel from Crystal Reports 8.0.1.0

    Post Author: Manoj
    CA Forum: Exporting
    Hi, I am using Seagate Crystal Reports 8.0.1.0 along with my VB application. System was exporting into Excel on Older Versionsof Windows like 98 and all. But in XP, after exporting if i open the exported file, either i get a message like Cannot Read From Fileor A Blank Sheet in the Excel. I have already tried copying the U2*.dll from the crystal folder to System/System32 folder but it is notexporting. Somebody please help... RgdsManoj

    Sage is an OEM partner. For any database issues please ask Sage for assistance.

  • Portal export into Excel---V HIGH IMP please

    Dear All,
    Very urgent probelm reagdring the portal report.
    Once the report is executed into the portal and then while exporting that report into excel i am getting the report is very nice in producation..
    One of my clinet also doing the same at his end,But while exporting the report into excel is getting problem.No allignments taken place there!!!
    But we are using differnet verions of excel from quite long time and we are getting the reports very fine from couple of months..So version doesn't a matter....even though just we are exporting into excel,so that old veriosn also not a problem for uS...
    Please suggest me how can i solve this issue?

    Finally i got few interesting points in the enduser reports and my report
    My Report:
    Inside the excel it shows sheet1 is as SAP_DOWNLOAD
    My Sheet inside excel is : SAP_DOWNLOAD
    Enduser Report:
    Inside the excel sheet name is differnt....and the first line in the report is some code which includes the my excel sheet1 name same SAP_Download
    Their Sheet inside excel is   :  .xls]SAP4IHV6PV4AXREVZ888UCSR2H83[1]
    So My sheet name looks like in the below text which is the first line in the excel report of enduser's
    2 #FF3333 3 #99FF99 14 #D4D4D4 15 #C0C4C7 21 #F87C7C 23 #E0E5E8 27 #F2F2F2 37 #FFBBBB 42 #60ED84 43 #FFCC33 44 #FFAB1D 45 #FF8800 47 #C0CACF 49 #5BCB77 Test SAPBW_DOWNLOAD False False SAPBEXqueries SAPBEXsysID ="BP1" SAPBEXdnldView ="227KWHOUG9ESCS6U7FE3E64GR" Print_Titles 1 =SAPBWDOWNLOAD!_$A:$C,*SAPBWDOWNLOAD_!*$9:$10
    So can any one can help now?

  • Should I use JSP,JSTL,SERVLETs without a framework?

    Hi Guys
    I'm making a multi player browser game. The game will have some forms to setup data into the database and the player will be able to check other players data.
    I will load the players data from the DB into a Bean when the application starts and then just get the other players information from DB when and if asked.
    I'm planing on doing it as MVC2 using JSP, JSTL, SERVLETs, BEANs
    Would you recommend me to use Struts for example? should I just use it without any framework?
    I read a lot about Struts and can't really see what it can bring to an application like mine. I can use the i18n easily with JSTL and for few validation of forms I don't know if it's worth it.
    What do you think? (-:
    Thanks in advance
    (-:

    If your going to use MVC2 then I would use a framework, otherwise where are you going to get your MVC from, were you planning on writing an MVC yourself?

  • Status gui &XXL (export to excel format)command doesnu00B4t work

    hi gurus i copied the standar GUI menu from SAPLKKBL and every thing its ok except the &XXL (export to excel format)command .
    i push this button and nothing happens. The popup doesn appear what is wrong? i have excel in my pc and when i use the %PC
    command it works fine and converts to excel but i need the mmhtml format so i need the &XXL command works . any idea?

    IM DOING SOME TEST I CHANGE THE TYPE OF ALV AND IT WORKS, BUT I NEED TO USE THE REUSE_ALV_BLOCK_LIST_DISPLAY AND THE PROBLEM IS WITH THIS TYPE OF ALV
    Moderator message - Please do not use all caps!
    Edited by: Rob Burbank on Sep 27, 2010 5:25 PM

  • Convert pdf into excel format - format issue

    Before I purchase an Adobe Acrobat Pro XI I have downloaded the trail version for evaluating. I have also run an Update of the program.
    Our company is receiving a lot of order files in PDF-format and instead of entering the order lines manually into our order system we want to convert these pdf files into Excel format. We can then use this xls file to upload the order into SAP and in that way save a lot of time. The pdf file consists of several columns as material number, description, quantity …..I want that every column in the pdf document also appears in one own column in the xls file. This works for several order lines but then suddenly are all the columns for some order line written into one and the same column and then are the columns again correctly written. I have tried with several pdf files with the same problem. Has anyone any idea what the reason for this issue is?

    Is this a PDF form? If so, you should be able to extract the data in the form using the manage data under the forms tools. That may be what you are looking for.
    Whenever I see a post related to forms by a commercial concern, there is an issue related to Reader rights. Some of this has changed with AA XI and it would be good to review the license agreement carefully to be sure you are in compliance (law suits are not pretty).

  • How can i convert oracle report in excel format using 8i

    hi,
    I want to convert oracle report in excel format using 6i reports. please give the solution with emp table.
    millons of thanks in advance.

    You'll have to use the destype DELIMITEDDATA to render your Report in CSV format. Then set the mime type to Excel. I don't know the exact syntax, so please do a search in metalink for "reports excel" for examples and more info.
    Regards,
    Martin Malmstrom

  • How can I schedule an export to excel format of an OBIEE Analysis or Dashboard to a local directory ?

    Hello,
    I would like to schedule with an agent some reports in OBIEE 11g that must be exported in excel format to a specific local directory.
    There is a need for a group of OBIEE users to have a set of reports ready (exported in .xlsx) every morning.
    Furthermore, if the previous scenario is possible then could I deliver a whole OBIEE Dashboard with the same way?
    Any input will be appreciated.
    Thank you in advance.

    Hi,
    As of now , we are not able to save the report in shared location in Linux /Unix.
    Windows it is possible.
    http://satyaobieesolutions.blogspot.com/2013/03/oracle-bi-ee-11g-calling-vb-scripts-to.html
    http://satyaobieesolutions.blogspot.com/2013/03/oracle-bi-ee-11g-calling-js-scripts-how.html
    Thanks,
    Satya Ranki Reddy

  • Read an excel file using JSP in MII 12.1

    Hi,
    I want to read an excel file using jsp page. I dont want to use the UDS or ODBC for connecting to excel.
    I am trying to use org.apache.poi to read the excel file in jsp page.
    While running, its showing a compilation error "package org.apache.poi.hssf.usermodel does not exist"
    I have the jar files for it, where do we need to upload it so that jsp page works.
    Thanks a lot
    Regards,
    Neha Maheshwari

    The user doesn't want to save the excel file in server.
    I want to upload file and save its contents in database.
    I have the code to read and save excel data in database but not able to get the location to deploy the jar file.
    In general, if we are creating a jsp page in MII workbench which is using some jar file.
    Whats the location to upload this jar file so that the jsp page works correctly?

  • I would like to upload a excel file using jsp

    Hi,
    I would like to upload the excel file using jsp in my netbeans ide. Please help.
    I don Know what is the error in this jsp file. It is not showing any thing and the file is also not getting uploaded.
    Please gothru the code below.
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ page import="java.io.*" errorPage="err.jsp"%>
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="<html:rewrite page="/design.css" />" rel="stylesheet" type="text/css">
    <title>Upload Page</title>
    </head>
    <body onKeyDown="DisablingBackFunctionality()" onLoad="DisablingBackFunctionality()">
    <html:form action="download" >
    <div style="position:absolute; left:100;top:200;">Select an excel File :<input type="file" name="uploadfile"></div>
    <div style="position:absolute; left:190;top:250;"><input type="submit" name="Submit" value="Read"></div>
    <div style="position:absolute; left:336;top:250;"><input type="reset" name="Reset" value="Clear"></div>
    mainmenu
    </html:form>
    </body>
    </html>
    <%
    String contentType = request.getContentType();
    if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) {
    DataInputStream in = new DataInputStream(request.getInputStream());
    int formDataLength = request.getContentLength();
    byte dataBytes[] = new byte[formDataLength];
    int byteRead = 0;
    int totalBytesRead = 0;
    while (totalBytesRead < formDataLength) {
    byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
    totalBytesRead += byteRead;
    String file = new String(dataBytes);
    //out.println("<br> file :"+file);
    String saveFile = file.substring(file.indexOf("filename=\"") + 10);
    //out.println("<br> savefile :"+saveFile);
    saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
    //out.println("<br> now file1 :"+saveFile);
    saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1, saveFile.indexOf("\""));
    //out.println("<br> now file2 :"+saveFile);
    //out.print(dataBytes);
    String ext = "";
    if (saveFile.indexOf(".") != -1) {
    ext = saveFile.substring(saveFile.lastIndexOf("."));
    int lastIndex = contentType.lastIndexOf("=");
    //out.println("<br>lst index of"+lastIndex);
    String boundary = contentType.substring(lastIndex + 1, contentType.length());
    //out.println("<br> boundary"+boundary);
    //out.println("<br> file :"+file);
    int pos;
    pos = file.indexOf("filename=\"");
    //out.println("<br> now 0 :"+pos);
    pos = file.indexOf("\n", pos) + 1;
    //out.println("<br>now 1 :"+pos);
    pos = file.indexOf("\n", pos) + 1;
    //out.println("<br>now 2 :"+pos);
    pos = file.indexOf("\n", pos) + 1;
    //out.println("<br>now 3"+pos);
    int boundaryLocation = file.indexOf(boundary, pos) - 4;
    int startPos = ((file.substring(0, pos)).getBytes()).length;
    int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
    FileOutputStream fileOut = new FileOutputStream("D:\\" + saveFile);
    //FileOutputStream fileOut = new FileOutputStream(saveFile);
    //fileOut.write(dataBytes);
    fileOut.write(dataBytes, startPos, (endPos - startPos));
    fileOut.flush();
    fileOut.close();
    session.setAttribute("fil", saveFile);
    //out.println("File saved as " +saveFile);
    %>
    <script type="text/javascript" >
    function DisablingBackFunctionality()
    var URL;
    var i ;
    var QryStrValue;
    URL=window.location.href ;
    i=URL.indexOf("?");
    QryStrValue=URL.substring(i+1);
    if (QryStrValue!='X')
    window.location=URL + "?X";
    </script>
    Please let me know the result as soon as possible. Its my very urgent.
    Thanking Yu,
    Muthu Kumar.R

    No.
    Mylenium

  • How can i upload a image file to server by using jsp or servlet.

    Hi,
    I m gurumoorthy. how can i upload a image file to server by using jsp or servlet without using third party API. pls anyone send me atleast outline of the source code.
    Pls send me anyone.
    Regards,
    Gurumoorthy.

    I'm not an applet programmer so I can't give you much advice there.
    If you want to stream the file from the server before it's entirely uploaded, then I don't believe you can treat it like a normal file. If you're just wanting to throw it up there and then listen to it, then you can treat it like a normal file.
    But again, I'm not entirely certain. You might be able to stream the start of the file from the server while you're still uploading the end of it, but it probably depends on what method you're using to do the transfer.

Maybe you are looking for