Opening excel sheets

Hi,
I have one servlet that is supposed to create an excel sheet. Then I have a couple jsp's with a link to this servlet on each of those jsp's. The content of the excel sheet should depend on wich link has been clicked. My problem is: if I open an excel sheet from one link, and then open another sheet from another link without closing the first one, the new sheet is not created. Is there any solution for this? Thanks

How? Here is the link to the servlet where ExcelTable.java is the name of the servlet file.
Download this table in Excel format

Similar Messages

  • EXCEPTION RAISED WHILE OPENING EXCEL SHEET FROM E-BUSINESS SUITE FORM

    Hi,
    I got error message ORA-10656I when was trying to open excel sheet which is in my local drive from e-business suite form. the following is the code where it is raising error.
    Appid := dde.app_begin('C:\Program Files\Microsoft Office\Office12\EXCEL.EXE '||'D:\emp.xls' ,dde.app_mode_normal);
    Oracle EBS version : 11.5.10.2cu
    Server : HP
    OS : HP Unix 11.11
    Could anyone help me out
    Thanks

    Two different forum users, exactly the same question? Hardly possible. So I guess this is just a double post.

  • Opening Excel sheet from server

    Hi I have one requirement to open Excel Sheet.
    The Excel sheet is residing in a directory parallel to WEB-INF. I am using Jboss server in Linux. in UI whenever I click on link I have to open Excel sheet from the server. Before opening Excel sheet I have to fill with some data. i am using JSP/Servlets .
    Can any one help me on this?
    Guru

    this piece of code is just open a xsl file with writing some data on the file
    it may be helpful for u .i am giving only logic.
    import java.util.*;
    import java.io.* ;
    import java.text.* ;
    public class a{
         // Main method
         public static void main (String args[])
              // Stream to write file
              //File file;
              FileWriter fout;
              String TimeStamp;
              try
              // Open an output stream
              Calendar currentdate= Calendar.getInstance();
                   int currmonth=currentdate.get(Calendar.MONTH)+1;
                   String strMonth="";
                   if(currmonth<10)
                        strMonth="0"+currmonth;
                   String wbname="Equifax"+strMonth+currentdate.get(Calendar.YEAR)+".xls";
                   System.out.println(wbname);
              BufferedWriter outfile = new BufferedWriter(new FileWriter(wbname));
                   //file=new File(filename);
                   fout = new FileWriter (wbname);
              // Print a line of text
              TimeStamp = new java.util.Date().toString();
              //String filename1=file.getName();
              outfile.write(" Apply ");
              // Close our output stream
              outfile.close();          
              // Catches any error conditions
              catch (IOException e)
                   System.err.println ("Unable to write to file");
                   System.exit(-1);
    }

  • Problem when opening excel sheet in jsp

    Hi friends
    When i try to open excel sheet from my program I am getting two problems
    1. first row of excel sheet is empty
    2. while opening I am getting error message of "the file is not in a recognizable format"
    Please help me..It is an urgent work
    my code
    <%@page language="java" import="java.io.*,java.text.*,java.sql.*,java.util.*"%>
    <%
    Class.forName("org.gjt.mm.mysql.Driver");
    Connection conn = DriverManager.getConnection("jdbc:mysql://256.136.119.86/mydb","zzz","zzz");
    Statement st = conn.createStatement();
    StringBuffer sb = new StringBuffer();
    sb.append("SAP#" + "\t");
    sb.append("x-plant status" + "\t");
    sb.append("Total Amount" +"\t");
    sb.append(">90 days" + "\t");
    sb.append("\n");
    try
    String query="select * from temp_Xplant";
    ResultSet rs = st.executeQuery(query);
    while(rs.next()){
    sb.append(rs.getString("sapNo") + "\t");
    sb.append(rs.getString("status")+ "\t");
    sb.append(rs.getString("amt") + "\t");
    sb.append(rs.getString("days") + "\t");
    sb.append("\n");
    conn.close();
    st.close();
    catch (Exception e)
    out.println("error");
    conn.close();
    st.close();
    response.setContentType("application/vnd.ms-excel");
    // response.setHeader("Content-Disposition", "attachment; filename=\"test.xls\"");
    String testt = "tests.xls";
    response.setHeader("Content-Disposition", "attachment; filename="+testt);
    out.println(sb.toString());
    out.close();
    %>
    thanks in advance

    The problem here is, you have setted the content type as excel sheet and you are writing some String content into the output stream. when excel tries to read the String content it will surely throw some error. Lot of excel APIs are available in the market to generate excel sheets.
    you can find one in the below URL.
    http://www.teamdev.com/downloads/jexcel/docs/JExcel-PGuide.html

  • Installing Control Panel 2/3 causes problems in opening Excel sheets

    After installing the control panel 3.0, I can't open Excel sheets properly anymore. A message says that the Excel sheet contains corrupted data and Excel can try to restore them. After confirming this, the excel sheet shows opened but all formating is gone.
    I had this issue yet with Control Panel 2.0. After some research on the web I found out that the problem is caused by the CP for Windows. I then switched back to CP V 1.1.4 and the excel sheets opened properly again.
    Thanks for any advise. I'm using Windows 7 and Excel/Outlook 2007.

    You are downloading software illegally. ShapeShifter is shareware so unless you indicate that you paid for it I don't feel it is appropriate to post your issue in this forum setting.

  • How to open Excel Sheet using JSP?

    Hi Dear,
    I want to open Excel Sheet in client browser, How to do this using JSP?
    If it is possible to open, client can make the changes in the sheet if he saves those changes, those changes must reflect on server.
    So pl. tell me how to do this?
    Thanks

    The following code gets data from an ODBC link to an Excel spreadsheet and displays it as a HTML table. You can modify the table to include <input> fields to update the spreadsheet when the form is submitted.
    I hope that this helps. -Don
    <%
    /* Establish connection to excel database(spreadsheet)
    ODBC DSN="xltest" */
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    java.sql.Connection con= java.sql.DriverManager.getConnection("jdbc:odbc:xltest");
    java.sql.Statement st = con.createStatement();
    java.sql.ResultSet rs = st.executeQuery("SELECT * from [Sheet1$]");
    java.sql.ResultSetMetaData rsmd = rs.getMetaData();
    %>
    <html>
         <head><title>Excel Database connection test</title></head>
         <body><table border=1 cellspacing=0><tr>
    <% // Print Column headings (first row of spreadsheet)
    for (int i = 1; i <= rsmd.getColumnCount(); i ++){
              %><td id='td1'><%=rsmd.getColumnName(i)%></td><%
    }//End for
    %></tr><%
    while(rs.next()) { // Print row data
    %><tr><%
         for (int i = 1; i <= rsmd.getColumnCount(); i ++) {
                   %><td id='td2'> <%=rs.getString(i)%></td><%;}// End for
    }//End while
    st.close();
    con.close();
    %>
    </tr></table></body></html>

  • Open excel sheet through program calculate value and fetch value in program

    Hi experts,
    My requirement is to open a excel sheet while i execute a report,There is some calculation that i need to do in excel sheet and want to fetch the calculated value back in to my program.
    Is there any way of doing so ?
    Regards,
    Kashyap

    Hi Aditya ,
    let me once more clarify with ur requirements .
    User is uploading an excel sheet.
    U doing validations on the records and getting the error in records.
    Displaying the uploaded excel sheet to user to rectify the errors.
    and then update the databse with the correct records.
    So for the above
    use WS_upload ,GUI_Upload  FM for  uploading the excel sheet in itab.
    using this itab ,Dynamically add one more column for the errors.
    Refer :Re: Could anyone tell me how can I add columns in a internal table dynamically?
    Display records in an editable ALV grid.
    BCALV_EDIT_01
    BCALV_EDIT_02
    BCALV_EDIT_03
    BCALV_EDIT_04
    BCALV_FULLSCREEN_GRID_EDIT
    BCALV_GRID_EDIT
    BCALV_TEST_GRID_EDIT_01
    BCALV_TEST_GRID_EDITABLE
    Also see this
    http://www.sapdevelopment.co.uk/reporting/alv/alvscr.htm
    then update the database
    Regards
    Renu
    Edited by: Renu Gusain on May 8, 2009 8:40 AM

  • Open excel sheets in separate windows by clicking link.

    Hi,
    I have a web page which has a link. When user clicks on the link, a servlet is invoked that creates an excel sheet and opens it in MS-Excel. I used "res.setContentType("application/vnd.ms-excel");" to achieve this.
    But every time I click the link it opens up the sheet on the same MS-Excel window. It doesn't open up the excel sheet in new other window.
    Now here is my requirement: Whenever user clicks on the link, a new MS-Excel window should open up containing the excel sheet. So if user clicks the link 3 times, then 3 separate window should open up each containing its own excel sheet.
    Can anyone help me out in achieving this?
    Thanks in advance...

    Hi, try this
    In JSP/HTML
    Export To Excel
    In Servlet
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-disposition","attachment; filename=MyProjectExport.xls" );
    In web.xml
      <servlet>
        <servlet-name>excelservlet</servlet-name>
        <servlet-class>myPackage.ExcelServlet</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>excelservlet</servlet-name>
        <url-pattern>/MyProjectExport.xls</url-pattern>
      </servlet-mapping>Assuming I haven't made any typos obfuscating the real packages, it
    should work. I think the step you are missing is to add the servlet
    mapping so that the servlet name is MyProjectExport.xls
    In the example above, I've made my servlet name match the filename in
    the Content-disposition, though in my real application it deosn't seem to
    matter that they don't match. In the html, you link to the name of the
    servlet, rather than the filename, but if you name them the same, I
    guess it won't matter.
    Arth

  • Open excel sheet by sheet name .... subvi not closing

    Hi all,
    I am experimenting with excel and labview and I want to open an excel sheet by its name.  I have created a project with a main vi where I hit a button to start the process.
    When this button gets hit an event handler opens my subvi that actually asks for a file, then scans all the sheet names and then in this subvi I have another subvi that pops up and gets this sheet names.  When I hit OK this one should close and the first subvi should continue.  This all works fine and I am able to read the preferred sheet name but the subvi that asks for sheet name to read does not close.  When I run this subvi by itself then it closes when I hit ok.
    I have added the whole project here so if anybody could have a look at it and tell me what I am doing wrong I would appreciate it.
    Thanks
    Lieven
    Solved!
    Go to Solution.
    Attachments:
    EXCELPROFILE.vi ‏48 KB
    Choose Excel Sheet.vi ‏30 KB
    Main VI.vi ‏20 KB

    Ok .... I've found the problem thanks to another post on the forum.  I changed the window appearance to dialog which solved the problem.
    Lieven

  • Firefox hangs when opening excel sheet in microsoft sharepoint

    When opening a excel sheet in Microsoft sharepoint Firefox hangs / freezes. (not responding)
    Only solution is to select end task in task manager.
    This is with version 3.6.8 ( there is no problem with 3.6.4)
    == URL of affected sites ==
    http://

    The problem here is, you have setted the content type as excel sheet and you are writing some String content into the output stream. when excel tries to read the String content it will surely throw some error. Lot of excel APIs are available in the market to generate excel sheets.
    you can find one in the below URL.
    http://www.teamdev.com/downloads/jexcel/docs/JExcel-PGuide.html

  • Open excel sheet in sap customize screen

    hi
        i want to open a excel sheet in my customize screen and display data from a table in the excel sheet.
    if any sample program or any idea please suggest.
    thanks.
    biswakalayana

    Welcome to SCN.
    Search forum for OLE to get your solution.
    ~ Read rules of Engagements.
    ~ Search the forum before posting the query.

  • Opening Excel sheet in Excel Application instead of browser

    Hi,
    I need to open an excel sheet from a JSP. When i click the link it opens a pop-up which asks open/save. This is fine. but when i click open it opens the excel sheet in the IE itself. I want the excel sheet to be opened using MS Excel Application. This is the piece of code i have used:
    response.setHeader("Content-Disposition", "attachment;filename="+ displayFileName);
    Also the pop-up does not show the "displayFileName" as set by me but some other name.
    Please help me out regarding this!
    Thanks in Advance!!!

    I think that for that you have to use java with activeX
    http://www.javaworld.com/javaworld/jw-09-1996/jw-09-blundon.html
    or if possible use the runtime library to call the excel executable and send it arguments.
    MeTitus

  • To open excell sheet in oracle bean area?

    Hi Gurus,
    Kindly anybody can tell me exactly which properties to set in oracle forms/bean area to use the java bean in forms.
    Scenario is that i want open an excell sheet in bean area of a oracle 9i form.
    Thanx in advance!

    Could you please post this on the Forms forum as I think you question is more directed towards the Forms PM Team
    Thanks
    Business Intelligence Beans Product Management Team
    Oracle Corporation

  • Not able to open excel sheet

    Hi.
    If i read the excel sheet immedialty after disposing it,  throghs an error saying can't open the file.
    Please see the attached vi. Call this twice for same file without any delay throughs an error.  I am giving the correct parameter.
    I added 200ms dealy to avaoid the problem.
    NOTE: this problem is seen in high speed systems.
    Please let me know wheather my ci is wrong.
    Thank you,
    Ranjith

    hoops... sorry for that..
    Attachments:
    Read data from Excel file.vi ‏34 KB

  • How to send data to an already open excel sheet

    I have a simple VI that opens a closed excel file, writes data to it and closes it.
    I want to modify it to write data, unconcerned of whether the file is open or closed.
    how to do it..
    I have attached the VI here..
    thanks..
    Attachments:
    Save to Excel.vi ‏11 KB

    When you open a file you make a copy of the data on disc and put it in memory somewhere the application that opened it knows about. 
    In your case a spreadsheet open in Excel will have its file locked for its exclusive use.  This prevents the file from getting updates by more than one application which would most assuradly cause unintended consequences (the file would get corupted.)
    In other words You only think you want to write data from LabVIEW to a file open for editing in Excel - You really don't want to do this
    Jeff

Maybe you are looking for

  • Auto PO  creation using purchase requisition

    Hi, I have tried the following steps for auto PO creation using purchase requisition. i. Maintain Auto PO in Material master Purchasing view ii. Select Automatic purchase order in Vendor master- Purchase data iii. Maintain info-record iv. Create PR t

  • Do I loose all the contact on my mac if I install OS X Mountain Lion

    Hi, I want to install OS X Mountain Lion but I wonder if I loose all the content i.e. file and program that I have already on my mac. In that case I have to make backup of all the contents.

  • Configuring SSH(Secure Shell) in solaris 10

    Hi , I need help to configure ssh ( secure shell ) on Solaris 10. I tried the following steps On the Local Machine a) Generated public and private key using key-gen The private key is stored in $HOME/.ssh/id_rsa The public key is stored in $HOME/.ssh

  • Target costs on Process orders not calculating

    Hi All, We have released standard costs for all the materials. We have also done Goods receipt for the process order but still the TARGET COSTS are not getting updated. Can some one tell is any specific config present for the same. We need to fix the

  • Link QM to decentral LES/WM

    Hi @ all! Is anybody experienced in linking QM (Enterprise 4.7) to a decentral LES (ECC 6.0)? We are using Handling Unit Management (HUM) and delivery scenario to flange on. I'm searching for a proper solution to flag HU for quality inspection and to