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 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
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
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
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"/>
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
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 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 update
how to update   conditional 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
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
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 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
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 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
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
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
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
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 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
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
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
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
regarding-update the Jsp page itself - JSP-Servlet
is i want to update the information on same Jsp page. How can I implement...regarding-update the Jsp page itself   Joined: Aug 17, 2009 Messages: 12 [Post New]posted Today 10:39:52 PM Quote Edit [Up] I have two Jsp
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
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
JSP Submit Button
JSP Submit Button  Sir, I have a JSP page with 2 Submit button, both calls doPost method of same servlet. If I click any submit button the text box value get refreshed and set to null or blank, that should not happen. Plz help
JSP/Servlet to read and update Excel
JSP/Servlet to read and update Excel  Hi Team, My requirement is based upon my input(name) value via one jsp, the program(jsp/servlet) should fetch... access to edit the values and update back to the Excel. So when the user give update
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
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
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
update excel sheet using jsp::
update excel sheet using jsp::   Hi Sir,... I have a excel... given excel sheet and display it into another excel sheet using jsp" i am using 'session' to get the empid from one page to another jsp
How to use next and previous button(or href) for database table that is retrieved from MySQL DB using jsp,jstl,javascript
How to use next and previous button(or href) for database table that is retrieved from MySQL DB using jsp,jstl,javascript  when click on the next...; please visit the following links: http://www.roseindia.net/jsp
how to update image in php
how to update image in php  how to update image in php
Read Excel data using JSP and update MySQL databse
Read Excel data using JSP and update MySQL databse  HOw to read excel data using JSP and update MySQl database
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 get following output
how to get following output  input 123456 output 1 2 3 4 5 6
how to get following output
how to get following output  input 123456 output 1 2 3 4 5 6
how to print the following pattern
how to print the following pattern  Hello hEllo heLlo helLo hellO pls reply soon its an emergency   class StringPattern { public static void main(String[] args) { String st="hello
update
update  how can i update multiple records in database using jsp ,servlet and jdbc based on selection of checkbox in jsp
JSP Servlet update patient data - JSP-Servlet
JSP Servlet update patient data  Hi Friend, I'm attaching my... not working in my case, perhaps of the following things which I can explain to you so... in the edit process using the one while (rs.next()){ loop. Can you show me how
Radio Button Problem in jsp.
Radio Button Problem in jsp.  I have a small doubt in my application, my requirement is to get a "single selectible row", I generated a radio button... radio button values from jsp to action using javascript
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
Radio button in JSP - JSP-Servlet
Radio button in JSP  Hi! In my page I have two radio buttons. If i select first radio button. one text field has to be displayed.... If i select second radio button. text field has to be disappeared. pls.... help me.. 

Ads