Home Answers Viewqa Java-Magazine code for attendence in excel sheet

 
 


hari
code for attendence in excel sheet
1 Answer(s)      4 years and 5 months ago
Posted in : Java Magazine

View Answers

December 21, 2008 at 10:39 PM


Hi friend,

Code to help in solving the problem :

<html>
<head>

</head>
<body>
<br><br><br><br>
<form name="searchForm" method="post" action="excelData.jsp">
<table align="center" bgcolor="LIGHTBLUE">
<tr>
<td colspan=3 align="center"><b><span style="font-size:20px;">Create a Excel file</span></b></td>
</tr>
<tr>
<td colspan=3>&nbsp;</td>
</tr>

<tr>
<td><b>Search</b></td>
<td><input type="text" name="empid" value=""></td>



<td><input type="submit" name="Submit" value="Search"></td>
</tr>
<tr>
<td colspan=3>&nbsp;</td>
</tr>
</table>
</form>


</body>
</html>


"excelData.jsp"

<%@ page import="org.apache.poi.hssf.usermodel.HSSFSheet"%>
<%@ page import="org.apache.poi.hssf.usermodel.HSSFWorkbook"%>
<%@ page import="org.apache.poi.hssf.usermodel.HSSFRow"%>
<%@ page import="org.apache.poi.hssf.usermodel.HSSFCell"%>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>


<%!
Connection conn = null;
String url = "jdbc:mysql://localhost:3306/";;;
String dbName = "user_register";
String driver = "com.mysql.jdbc.Driver";
String username = "root";
String userPassword = "root";

%>
<br><br>
<%

java.util.Date date = new java.util.Date();

String filename = "c:\\excel\\f"+date.getTime() +".xls" ;

String empid="";
if(request.getParameter("empid")!=null)
{
empid= request.getParameter("empid").toString();
}

try{



HSSFWorkbook hwb = new HSSFWorkbook();
HSSFSheet sheet = hwb.createSheet("new sheet");




int index=1;



HSSFRow row = sheet.createRow((short)index);
row.createCell((short) 0).setCellValue(empid);
row.createCell((short) 1).setCellValue(date);

index++;

FileOutputStream fileOut = new FileOutputStream(filename);
hwb.write(fileOut);
fileOut.close();
out.println("<b>Your excel file has been generated</b>");

} catch ( Exception ex ) {

}
%>

Thanks









Related Pages:
code for attendence in excel sheet - Java Magazine
code for attendence in excel sheet  When i enter an "Empid "in an an HTML page, time of the system should save in the excel file of that Empid row(IE... enter in to the other cell of that row . It is like attendance".Give jsp code
reading excel sheet in java
reading excel sheet in java  can anyone tell me a proper java code to read excel sheet using poi   Here is a java code that reads an excel file using POI api and display the data on the console. import java.io.
Excel sheet image reading issue
Excel sheet image reading issue   Hello every one.I?m trying to read images from an excel sheet using OleDbDataReader. My excel file has 6... with a ?blank? for the sixth column. Here is my demonistration code
Create Excel Sheet Using JSP
create excel sheet using jsp       In this example we create excel sheet and insert values into table of the excel sheet . In this example we use page directive
school student attendence report
school student attendence report  Hi i want school student attendence genaration source code please urgent help me
exporting data to excel sheet - JDBC
= wb.createSheet("Excel Sheet"); try{ Connection con = null...exporting data to excel sheet  Sir i have already send request about this problem sir.Sir i want code for below application Sir whenever execute
Selecting Excel Sheet File
selecting excel sheet file       In this program we are going to select the excel sheet... sheet .  The package we need to import is java.io.* 
export data to excel sheet - JSP-Servlet
export data to excel sheet  Hi.. how to export data to excel sheet from jsp? and how to update the excel sheet from jsp? and how to get the data from excel sheet? and how to make calculations in excel sheet like total avg
Excel sheet in read only mode - WebSevices
Excel sheet in read only mode  If am opening an excel sheet(through... make changes.But that i dont want,Also i have checked the permission in excel sheet,It has both read and write permission. How can i make the excel sheet
student attendence report
student attendence report  Hi every body iam doing a school project... student attendence daywise ,monthly ,halfyearly and yearly how i generate plz send me code urgent any one can help me. thnks
Set Zoom Magnification of Excel Sheet
In the below code, an Excel(.xlsx) workbook's sheet's magnification...Set  Zoom Magnification of Excel Sheet In this section, you will learn how to set the zoom magnification of a Excel workbook's sheet. Zoom
Insert Image into Excel Sheet
Insert Image into Excel Sheet In this section, you will learn how to insert image into excel sheet using Apache POI. In the given below example, am image is insert into excel sheet at row 1 and at column 1. you can specify the top
Inserting Image In Excel Sheet Using JSP
Inserting Image In Excel Sheet Using JSP       In this example, we create excel sheet... can use third party APIs to create the excel sheet, which you can learn in our
Read a particular column in excel sheet - JSP-Servlet
Read a particular column in excel sheet  hi sir i want to a read a excel sheet ,in that i have to take a particular column that contains a mailIds ,use that column to send a mail to all so how to do this sir give me some code
export data from database to excel sheet - JDBC
execute a query then result will be display in MS-EXCEL sheet. please give me... HSSFWorkbook(); HSSFSheet sheet = wb.createSheet("Excel Sheet"); HSSFRow rowhead...export data from database to excel sheet  I am facing a problem about
Reading the Date and time values from excel sheet
Reading the Date and time values from excel sheet  hi guys , iam trying to read excel sheet data using apache poi api .my problem is i cant read... format but not both the below is the sample code please post your answers
Find Type of Excel Sheet
Find Type of Excel Sheet       In this program we are going to find type of an excel sheet..._CHART,  5.TYPE_EXCEL_4_MACRO, 6.TYPE_WORKSPACE_FILE The code of the program
Find Name of Excel Sheet
Find Name of Excel Sheet       In this program we are going to find the name of an excel... of sheet from  BoundSheetRecord.    The code of the program
Create Excel Sheet Using JSP
create excel sheet using jsp   ... into excel sheet using java .You can create any number of cells and rows... cells  into 0th row. The code of the program is given below
How to Create New Excel Sheet Using JSP
How to create new excel sheet using jsp  ... a new  excel sheet using java .You can create any number of  new excel sheets in a excel file.  To create a excel sheet we can use third party APIs
Read a particular column in excel sheet - JSP-Servlet
Read a particular column in excel sheet  hi sir i used ur code,but where i have to put that index value ,i am calling the following methods for sending a mail please help me if any changes.Following is my code for calling methods
Excel Sheet Footer
Excel Sheet Footer In this section, you will learn how to create footer on a sheet using Apache POI. In the given below example, we will create footers having different position on sheet. These footers will appear on the hardcopy
jsp excel code - JSP-Servlet
jsp excel code  hi how to store html form data into excel sheet by using jsp? and repeat this process continuously for entire sheet
make header and footer and attache it with excel sheet.
header and footer and attaché it with excel sheetCode description ...  make header and footer and attache it with excel sheet... and footer and page it on sheet.  The method used in this example shift row
insert rows from Excel sheet into a database by browsing the file
insert rows from Excel sheet into a database by browsing the file  hello, I am trying to insert rows from Excel sheet into SQL database by browsing Excel file in java(JSP). I can insert rows using ODBC connetion. But using odbc
Problem in executing macro enabled excel sheet using java
Problem in executing macro enabled excel sheet using java  Hi, I have written a java code which will read a excel sheet with macro enabled. then it will write data into sheet1 and sheet2 and it will execute a VB script
Excel Sheet Header
Excel  Sheet Header In this section, you will learn how to create header on a sheet using Apache POI. In the given below example, we will create... on the hardcopy(print out) . You can see this by taking print preview of the sheet. Given
How to save excel sheet into mysql database using blob or clob
How to save excel sheet into mysql database using blob or clob  Hi All, I am new to java and i need to upload excel sheet to mysql, please suggest...) ); Please help me with the code or steps to insert a large xlsx sheet. waiting
insert excel sheet into mysql as a table
insert excel sheet into mysql as a table  sir, i want to import an excel sheet into mysql5.0 database as in the table format using tomcat 6.0 by jsp
update excel sheet using jsp::
update excel sheet using jsp::   Hi Sir,... I have a excel sheet for employee details "i retrieve particular datas from given excel sheet and display it into another excel sheet using jsp
Drawing a Shape in Excel Sheet
Drawing a Shape in Excel Sheet In this section, you will learn how to draw a shape in excel sheets using Apache POI library. Using Apache POI, you can draw...; Secondly, for positioning the shape on the excel sheet , create an anchor. Use
read data from Excel sheet
read data from Excel sheet  Hi, How to read data from an excel sheet using JSP. Thank you
How to read every cell of an excel sheet using Apache POI and insert those data into a DB?
the rows of an excel sheet. Need the source code...How to read every cell of an excel sheet using Apache POI and insert those data into a DB?   i have an excel sheet, whose data in each cell has
Format Cell of Simple Excel Sheet(.xls)
Format Cell of Simple Excel  Sheet(.xls) In this section, you will how to format the cell of a simple excel sheet having extension .xls. In the below... library click here. The code is given below : import
how to display data in excel sheet?
how to display data in excel sheet?  According to the user Id,some... the button and to display the data in excel sheet... there will be a button called excel download,and if we click the button data
jsp with excel sheet data uploading into database
jsp with excel sheet data uploading into database  how to upload data in excel sheet with jsp into oracle 10g database
Need to Remove Duplicate Records from Excel Sheet
Duplicate Records from Excel Sheet. I have one excel sheet having two fields (EmpNum, Rating) have to save in another excel sheet with unique empnum of latest... and to save only unique empnum with rating in another excel sheet
Zoom in Excel
can say the size of excel sheet will be shrunken by 25%.    The code... can zoon in(-)  an excel sheet. By this means you can make an excel sheet... ratio of the excel sheet e.g. setZoom(3,4) means zoom the sheet as 75
extract data from excel sheet to mysql
extract data from excel sheet to mysql  sir, i want to extract data from excel sheet and save the data in mysql5.0 database in the form of table
browse and submit the excel sheet into mysql as a table
browse and submit the excel sheet into mysql as a table  sir, i want to browse and after clicking a submit button, the data in the excel sheet should be stored in the mysql5.0 as a table
Need to remove duplicate rows from the Excel Sheet using the Apache POI API
Need to remove duplicate rows from the Excel Sheet using the Apache POI API   Hi There, Is any one aware of java code on how to find the duplicate rows in excel.I am using the Apache POI API to achieve the same have googled
Excel Splits Pane Feature
Excel Splits Pane Feature In this section, you will learn how to split the excel sheet using Apache POI. Sometimes, you need to view more than one copy of the sheet. This can be done using Excel Splits Pane Feature. Using
Java swing: Export excel sheet data to JTable
Java swing: Export excel sheet data to JTable In this tutorial, you will learn how to read data from excel file and export it to JTable. In swing... and POI-HSSF api. Here we are using JExcel api to fetch the data from excel sheet
Reading And Writing Excel File
to download the excel file and code first then make folder with the name of excel in C drive then copy the excel file and copy the code into webapps then follow... reading and writing excel file   
How to export data from database to excel sheet by using java swing in standalone project - Java Beginners
this api in order to create an excel sheet. We are providing you another code...How to export data from database to excel sheet by using java swing... database to excel sheet by using java swing in standalone project.I get solution from
excel uploading in jsp
excel uploading in jsp  could you provide the source code for: 1)have to upload an empty excel sheet at client side i.e if client clicks an excel icon an empty excel sheet should open 2)when they fill data in that sheet and click
excel
excel  how to read columns values of excel file in java and store...(); k++){ int j=i+1; HSSFSheet sheet = wb.getSheetAt(k...; HSSFSheet sheet = wb.getSheetAt(k); int rows
Export data in excel sheet in java in struts - Struts
Export data in excel sheet in java in struts  Hello, All how can i export data in excel file i java  Hi friend, For solving the problem visit to : http://www.roseindia.net/jsp/excelfile.shtml Thanks
excel sheet reading and using that data - JSP-Servlet
excel sheet reading and using that data  i have to do a read a excel sheet file of a employee record and then i have to use a employee details to send mail to those employees how to do in jsp sir please help me sir.. Thanks
Export data to Excel Sheet in STRUTS 1.3
Export data to Excel Sheet in STRUTS 1.3  hi. how can i export content present on the jsp to excel sheet on button click..... and challenging part is i have to merge few rows and columns for a particular field(Value

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.