how to add a update button in the following jsp

how to add a update button in the following jsp

Once the excel from the following jsp is loaded to the broswer, how to add a button in the jsp to allow the user to update the excel?

thanks,

<%@page import="java.io.*"%>
<%@page import="java.util.*"%>
<%@page import="org.apache.poi.xssf.usermodel.XSSFSheet"%>
<%@page import="org.apache.poi.xssf.usermodel.XSSFWorkbook"%>
<%@page import="org.apache.poi.xssf.usermodel.XSSFRow"%>
<%@page import="org.apache.poi.xssf.usermodel.XSSFCell"%>
<table border="1">
<%  
    short a=0;  
    short b=1;  
    short c=2;  
    short d=3;  
    int i=0;    
        String   value1="", value2="",value3=" ", value4="";    
        String filename ="C:/hello.xls";     
        if(filename != null && !filename.equals("")){
        try{    
        FileInputStream fs =new FileInputStream(filename);    
        XSSFWorkbook wb = new XSSFWorkbook(fs);   
        for(int k = 0; k < wb.getNumberOfSheets(); k++){    
         int j=i+1;    
         XSSFSheet sheet = wb.getSheetAt(k);    
         int rows  = sheet.getPhysicalNumberOfRows();    
         for(int r = 0; r < rows; r++){    
         XSSFRow row   = sheet.getRow(r);    
         int cells = row.getPhysicalNumberOfCells();    
         out.write("<br>");    
            XSSFCell cell1  = row.getCell(a);      
            value1 = cell1.getStringCellValue();   
            XSSFCell cell2  = row.getCell(b);     
            value2 = cell2.getStringCellValue();    
            XSSFCell cell3  = row.getCell(c);      
            value3 = cell3.getStringCellValue();    
            XSSFCell cell4  = row.getCell(d);     
            value4 = cell4.getStringCellValue();    
%>    
<tr><td><%=value1%></td><td><%=value2%></td><td><%=value3%></td><td><%=value4%></td></tr>    
<%    
}       
 i++;   
}    
}catch(Exception e){  
  System.out.println(e);   
 }   
 }   
 %>    
</table>
View Answers









Related Tutorials/Questions & Answers:
how to add a update button in the following jsp
how to add a update button in the following jsp  Once the excel from the following jsp is loaded to the broswer, how to add a button in the jsp to allow the user to update the excel? thanks, <%@page import="java.io.*"%>
How to update record to database? I have trouble with the following code
How to update record to database? I have trouble with the following code  I have written the update statement but it still not work to update the record,what is the missing of the following code ?I need help,thankyou <?php
Advertisements
How to access the following tag from xml to jsp
How to access the following tag from xml to jsp  How can i get... the following link: http://www.roseindia.net/jsp/parsing-xml.shtml The above link... into jsp table
how to make JTable to add delete and update sql database table
how to make JTable to add delete and update sql database table  Hello all I want to know how to make JTable to act actively to add delete and update database table. i am struck ed here from long time please help me
How to call java method on Button click in jsp?
How to call java method on Button click in jsp?  How to call java method on Button click in jsp
how to add save,discard,& cancel button in a message box - Struts
how to add save,discard,& cancel button in a message box  how to add save,discard,& cancel button in a message box
JSP - Update displayed content & session variables when user clicks on a button - JSP-Servlet
JSP - Update displayed content & session variables when user clicks... JSP to do some internal check and then increment the value of a number on the page. I've spent much of the day yesterday trying to figure out how to do
How to add icons on a button or any component in java - Java Beginners
How to add icons on a button or any component in java  How to add icons on a button or any component in java?  Hi, import... main(String[] args){ JFrame frame = new JFrame("Icon on button
How to add a columns with a button set to a Jtable built with database result set
How to add a columns with a button set to a Jtable built with database result..., there should be another button to get further details of a account such as transactions... that button column to the table which is built with database result set. i would thank
How to add radio button value in a table for particular field?
How to add radio button value in a table for particular field?  Hi,I have a jsp form in which one static field for date and below a dynamic table...("Sql exception in add jsp " + e.getMessage()); }finally
JSP - Update displayed content & session variables when user clicks on a button - JSP-Servlet
JSP - Update displayed content & session variables when user clicks... JSP to do some internal check and then increment the value of a number on the page. I've spent much of the day yesterday trying to figure out how to do
how to disable submit button after login in jsp
how to disable submit button after login in jsp  Hi, I have... on the back button in browser it stars displaying login page. How to prevent this? how to disable submit button after login in jsp? Thanks   Hi, You can
how to add the calendar to the dynamic rows in html or jsp page - JSP-Servlet
how to add the calendar to the dynamic rows in html or jsp page   Hi Sir, i have 3 columns in my jsp page date of payment,amount recieved,no and i have 2 button in my jsp page ADD and delete button. when i click on add
uinavigationcontroller add right button
uinavigationcontroller add right button  Hi, How to add the right button programatically to a UINavigation Controller? Thanks   Hi, You can use the following code: - (void)viewDidLoad { [super viewDidLoad
how to update
how to update   conditional update
radio button in jsp - JSP-Servlet
radio button in jsp  hye there.how do I create radio button in jsp... a Netbean not a tomcat.What is the code for view and update in jsp?Thanks... action in the JSP page from the following link. http://www.roseindia.net/jsp
update jsp
update jsp  <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC...;/Controller"> <center> <input type="hidden" name="page" value="update"/>
How to search the selected item in row table using radia button in JSP?
How to search the selected item in row table using radia button in JSP?  How to search the selected item in row table using radia button in JSP
How to disable browser back and forward button after logout [in struts2 or jsp]
How to disable browser back and forward button after logout [in struts2 or jsp]  How to disable browser back and forward button after logout [in struts2 or jsp] I am using window.history.forward(); function
ADD ROW - JSP-Servlet
ADD ROW  Hi Sir, How to use add row and delete row concept in jsp .  Hi Friend, Please visit the following link: http://www.roseindia.net/jsp/add-element.shtml Thanks
how to add components (like button , checkbox etc) in a table column in core java
how to add components (like button , checkbox etc) in a table column in core java  plz tell me how to add components(like button, checkbox, radiobutton etc)in a table column in core java
How to add a column with checkboxes for each record in my table in JSP
How to add a column with checkboxes for each record in my table in JSP   Hi, Could you please explain it to me how I can add a column with check boxes for each record in my table in JSP? Also, I want to figure out a way
How to save form fields into the MySql Database without submit button in jsp?
How to save form fields into the MySql Database without submit button in jsp?  I want to store user inputs into the database using javasccript or ajax or jqury but without submit button. Form Contains three fields
how to add Arraylist filter for a jsp page showing results from a servlet
how to add Arraylist filter for a jsp page showing results from a servlet  hello sir/mam, in my project i have an arraylist showing results in a jsp..._TO_REPLACE_1 Please visit the following link: http://roseindia.net/jsp/servlet-jsp-data
How to use radio button in jsp page
How to use radio button in jsp page       This is detailed java code how to use radio button in jsp code and display a message in another jsp page according
how can i add wirecard option(or button ) at my web page plz tell all steps? View Answers
how can i add wirecard option(or button ) at my web page plz tell all steps? View Answers  how can i add wirecard option(or button ) at my web page plz tell all steps? View Answers
how to get data using dropdownlist, textbox and search button in jsp
how to get data using dropdownlist, textbox and search button in jsp  Hi, I want to display data using jsp,javascript and mysql. My Q. is If i select...' in textbox and click on search button it should show me all the title names
how to add data dynamically from database into a dropdown list in a jsp
how to add data dynamically from database into a dropdown list in a jsp  hi friends i am doing a project in jsp and oracle as my database.In my... and department fields also.I have a create an jsp page in which there should 2 drop down
sir, how to read empty cell in excel file using poi and how to add this empty cell to arraay list and the following is my code
sir, how to read empty cell in excel file using poi and how to add this empty cell to arraay list and the following is my code   //here my file nameis sample.xls and this file contain some blanks cells how to read and how
jsp continuation button
jsp continuation button  i have 2 jsps, 1st jsp page with continue button and 2nd jsp with submit button.so how do i create a sessionvariable in order to submit the 2jspforms
how i can add an horizontal scrollbar at my PdfAnnotation ? - JSP-Servlet
how i can add an horizontal scrollbar at my PdfAnnotation ?  How to add the an horizontal scrollbar at my PdfAnnotation ? for example document d=new document(0. document.open
How to make a button of different behaviour?
How to make a button of different behaviour?  Suppose In a jsp page I...").value,......); Now I want the SAVE button to be changed to UPDATE button id="btnSave1" value="UPDATE" and onclick event of UPDATE button will call
add button to the frame - Swing AWT
add button to the frame  i want to add button at the bottom of frame.i have created tha following coding.but it does not working.pls help me .thanks...); JScrollPane scrollPane = new JScrollPane(table); frame.getContentPane().add
Update Database from jsp
UPDATE button the database field should be updated . I have a drop down menu...Update Database from jsp   I want to update my oracle database...= null; st=conn.createStatement(); st.executeUpdate("UPDATE TEST_LINKS SET
jsp :how to edit table of data displayed using jsp when clicked on edit button
jsp :how to edit table of data displayed using jsp when clicked on edit button  i have a jsp program which displays data in the form of table ..now i... the data when clicked on save button.. how can i do
How to add
How to add   Hi, I want to make a website which will recommend users books according to the genre selected by them. I am using PHP, JavaScript... to be viewed after clicking a link/button/whatever mentioning -"Next 10
how to disable back button of a browser after logging in? - JSP-Servlet
how to disable back button of a browser after logging in?  how to disable back button of a browser after logging in?  where is the source code
how to pass input from radio button to jsp page
how to pass input from radio button to jsp page  hi.. the code below here there are list of radio buttons here in jsp page when the values... and you have to use the value attribute also.ADS_TO_REPLACE_2 Try the following code
Elasticsearch update by query add field
Elasticsearch update by query method to add field into existing documents..." } } } } } Then add data with following code: POST /store/mobile/1... following: POST /store/_update_by_query?pretty { "query" : { "match_all
Elasticsearch update by query add field
Elasticsearch update by query method to add field into existing documents..." } } } } } Then add data with following code: POST /store/mobile/1... following: POST /store/_update_by_query?pretty { "query" : { "match_all
Elasticsearch update by query add field
Elasticsearch update by query method to add field into existing documents..." } } } } } Then add data with following code: POST /store/mobile/1... following: POST /store/_update_by_query?pretty { "query" : { "match_all
Elasticsearch update by query add field
Elasticsearch update by query method to add field into existing documents..." } } } } } Then add data with following code: POST /store/mobile/1... following: POST /store/_update_by_query?pretty { "query" : { "match_all
Elasticsearch update by query add field
Elasticsearch update by query method to add field into existing documents..." } } } } } Then add data with following code: POST /store/mobile/1... following: POST /store/_update_by_query?pretty { "query" : { "match_all
Add as a friend - JSP-Servlet
Add as a friend  in chat project how we send a request to add as a friend and how other peaple add me in his friend list. i want jsp-servlet and java code also.\plz.. help me on this topic
How to identify the radio button id and row id in a table in jsp?
How to identify the radio button id and row id in a table in jsp?   function generateid(no) {var table = document.getElementById(tableID); var rowCount = table.rows.length
jsp :how to edit table of data displayed using jsp when clicked on edit button
jsp :how to edit table of data displayed using jsp when clicked on edit button  i have a jsp program which displays data in the form of table ..now i... the data when clicked on save button.. how can i do this   The given
how to pass input from radio button to jsp page
how to pass input from radio button to jsp page  hi.. the code below here there are list of radio buttons here in jsp page when the values are matched from database. I want to pass the selected value in Struts Action FormBean
how to pass input from radio button to jsp page
how to pass input from radio button to jsp page  hi.. the code below here there are list of radio buttons here in jsp page when the values are matched from database. I want to pass the selected value in Struts Action FormBean
update multiple rows in jsp - JSP-Servlet
update multiple rows in jsp  Hi I am trying to do a multiple row update in JSP. code as follows.. > Can you please tell me how to get this form values in actio page  Hi Friend
how to disable submit button in jsp using servlet when some condition is satisfied
how to disable submit button in jsp using servlet when some condition is satisfied  how to disable submit button in jsp using servlet when some condition is satisfied

Ads