Servlet and Excel

Discussions

Web tier: servlets, JSP, Web frameworks: Servlet and Excel

  1. Servlet and Excel (3 messages)

    Hi
    How to fetch data from Excel sheet that is been displayed by the Servlet...

    in detailed....
    i had writen a servlet which will desplay the info from the database in the form of an Excel sheet (i had done this by changing the cotent type "application/vnd.ms-excel"), now in my program the user will modify the data...am struck here, as i don't know hpw to collect the data from this displayed excel sheet...

    immediate response with small code will do a lot for me..
    Thank U
    Mallikarjun

    Threaded Messages (3)

  2. Servlet and Excel[ Go to top ]

    hi,

      To get the values from the excell sheet, either u have to go for html-dom. here i have written in javascript.

    <html>
    <head>
    <script>
    function fn()
    {
    var intext;
    intext = document.all["name"].innerText;
    alert(intext);
    }
    </script>
    </head>
    <form>
    <table>
    <tr>
    <td id ="name">Ajit</td>
    </tr>
    <input type="button" value="get" onClick=fn()>

    </table>
    </form>
    </html>


    this might help u

    bye
    gopal
  3. Servlet and Excel[ Go to top ]

    Hi Gopal
    i checkedout your code but am getting am error when am running the code..it says..innerText is not an object found.

    and haven't got where to give my Excel Sheet Name....
    can u just look into it pl
    Arjun


  4. hi Mallikarjun

    after reading ur question ,i thought of asking u a question which i guess u must be knowing .if yes please let me know on this mail id.
    similarly the way u have displayed some data in excel ,i have to display in word format.
    i have to display a record ,in a table format ,also set its font ,foreground color ,background color ,etc...
    after putting this data in the word format ,i have to display this.doc file through a servlet.
    please ,if u know how to go about it ,since u hav already done this in excel ,i have to do it in MS Word.
    please contact me on this id
    shubhangipatil at hotmail dot com