getting the excel path throuh web browser given from client(i.e thruogh .jsp)

getting the excel path throuh web browser given from client(i.e thruogh .jsp)

1)when client uploads the excel sheet through a .jsp page, 2)get that excel path from web browser and read the data from the excel and printing in a jsp page i.e response to client through jsp

please provide the code in spring thanks in advance

View Answers

November 8, 2013 at 11:45 AM

        HSSFWorkbook hwb=new HSSFWorkbook();
        HSSFSheet sheet =  hwb.createSheet("new sheet");
        HSSFRow rowhead=   sheet.createRow((short)0);
        HSSFRow row=   sheet.createRow((short)count1);
        rowhead.createCell((short) 0).setCellValue("SL NO");
        rowhead.createCell(1).setCellValue("BILL No");
        rowhead.createCell((short) 2).setCellValue("STUDENT NAME - CLASS");
        rowhead.createCell((short) 3).setCellValue("COLLECTION DATE");
        rowhead.createCell((short) 4).setCellValue("FEES NAME");
        rowhead.createCell((short) 5).setCellValue("AMOUNT");
        rowhead.createCell((short) 6).setCellValue("USER");


row=   sheet.createRow((short)count1);                              row.setHeightInPoints(20);                              row.createCell((short) 0).setCellValue(i);                              row.createCell((short) 1).setCellValue(res.getString(1));                           row.createCell((short) 2).setCellValue(res.getString(6)+" - "+res.getString(2)+" - "+strClassName);
                                    row.createCell((short) 3).setCellValue(validate.daterev(res.getString(5)));
                                    row.createCell((short) 4).setCellValue(x);                      row.createCell((short) 5).setCellValue(res1.getDouble(2));                      row.createCell((short) 6).setCellValue(res.getString(4)); 

        FileOutputStream fileOut =  new FileOutputStream(filename);
        hwb.write(fileOut);
        fileOut.close();
            <a href="<s:property value="feesReportExcelPath"/>">To Excel</a>

Ads









Related Tutorials/Questions & Answers:
getting the excel path throuh web browser given from client(i.e thruogh .jsp)
getting the excel path throuh web browser given from client(i.e thruogh .jsp)  1)when client uploads the excel sheet through a .jsp page, 2)get that excel path from web browser and read the data from the excel and printing
how to present the excel to the web browser in jsp
how to present the excel to the web browser in jsp  How to present the content of the newly created excel file in the following jsp to the web browser: <%@ page import="java.io.InputStream" %> <%@ page import
Advertisements
shortest path from the given source to dstination
shortest path from the given source to dstination  Hi. Here in my databse. CREATE TABLE b ( id int(10) unsigned NOT NULL AUTO_INCREMENT, source... to find the shortest path from the given source to destination based
how to display the excel file in the web browser.
how to display the excel file in the web browser.  > %@ page.../vnd.ms-excel" > %> <%@ page import="java.io.*" %> <% >... FileOutputStream > ("c:\\excel\\aqtemplate.xlsx"); > wb.write
Function data from web in MS excel
Function data from web in MS excel  Hello, I would like to import data from one webpage to Excel using function Data - From Web. The problem is that this web page has at the end .jsp . When I open it via Excel, click to data
Shortest path in JSP for a given source and destination
Shortest path in JSP for a given source and destination  Hi. Here... the shortest path from the given source to destination based on the databse values. I want to do this in JSP. I have to get the source and destination in text
Shortest path in JSP for a given source and destination
Shortest path in JSP for a given source and destination  Hi. Here... the shortest path from the given source to destination based on the databse values. I want to do this in JSP. I have to get the source and destination in text box
Show pdf's in web browser by using jsp?
Show pdf's in web browser by using jsp?  Hi, I want to display pdf file in browser by clicking the link, available in JSP page. When am trying to do this by using Anchor tag with absolute path, it is showing the error as: Http
Problem in getting file path in js
Problem in getting file path in js  hi, I am using ofbiz framework , How i can get the file path in javascript for input type = "file" and i am using only firefox not other browser. so please help me it is very important for me
How to export web page to excel using java or jsp or servlets
How to export web page to excel using java or jsp or servlets  Hi I am trying to export web page(jsp page ) to excel using jsp or servlets. I am retrieving records from database and displaying in the jsp page, In this page I
Getting a absolute path
Getting a absolute path     ... the path of the file or directory so that you can access it. If you know the path... in front you where you don't know the path of the file, then what will you do
How to export data from jsp to excel sheet by using java
How to export data from jsp to excel sheet by using java   How to export data from jsp to excel sheet by using java
How to Get The Data from Excel sheet into out jsp page???
How to Get The Data from Excel sheet into out jsp page???  How to Get The Data from excel sheet to out jsp page in webApp
Read code from excel sheet and upload into database using JSP
Read code from excel sheet and upload into database using JSP  I want to upload data to database from an excel worksheet using jsp ...Please help
how to read values from excel sheet and compare with database using jsp
how to read values from excel sheet and compare with database using jsp  hi sir i am arun how to read values from excel sheet and compare with database using jsp coding i.e, if i have 6(assetid,assetname,serialno,cubical
Read data from excel file and update database using jsp
Read data from excel file and update database using jsp  read data from excel file and update database using jsp Hi, I am using a MySQL database... upload excel file and update database using JSP ? Thanks in Advance
getting files from VSS
getting files from VSS  I am not able to get the files from VSS.I am using following code. and just let me know is localpath attribute is for our local project path? I am getting the problem in this line failed
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... given and printing them in a jsp page. could you please provide the code in spring
Insert data in Excel File from Database using JSP
developed a application to insert data  in excel file from database in JSP. We... Insert data in Excel File from Database  using JSP ... the data from database, create an excel file and data insert into newly
Wrong parameter values while exporting data from jsp to excel
Wrong parameter values while exporting data from jsp to excel   This is a jsp report. When i export the report data to an excel, the parameter..., specifically, if the parameter value is ALL, it gets translated to NO in excel
read data from Excel sheet
read data from Excel sheet  Hi, How to read data from an excel sheet using JSP. Thank you
Getting path name of uploading file in struts 2.8.1
Getting path name of uploading file in struts 2.8.1  Hai! I am using struts 2.8.1. I want to upload file into database with the path name. How can I can get the original path name of the file in struts 2.8.1? It only display
Getting path name of uploading file in struts 2.1.8
Getting path name of uploading file in struts 2.1.8  In my question I used struts 2.8.1 instead of 2.1.8. Sorry
Getting Parameter from a css styled jsp file to a java servlet file...
Getting Parameter from a css styled jsp file to a java servlet file...  This is my code.... login page-- <!DOCTYPE html PUBLIC "-//W3C//DTD... is it not getting the parameter??? How do i accept the value in the servlet file
getting int values from form and insert it in data base in jsp
getting int values from form and insert it in data base in jsp  how can i get form input such as id convert it to int insert it into database   Hi, You can get the parameter from the request object: String s
getting coords from an image.
getting coords from an image.  how to get coordinates dynamically(in run time) from an image?? pls help me
Jsp Absolute Path
illustrate an example from 'JSP Absolute Path'. To understand JSP Absolute Path example... Jsp Absolute Path   ... the absolute path in jsp. The absolute path is the full path that contains the root
Java Web Browser Problem
Java Web Browser Problem  Hello When run my web browser this is not displaying complete page any of the website like other browser.So Plz help me...."); setTitle("NextVision Browser"); setSize(600,400); Container
JSP TO EXCEL
JSP TO EXCEL  Hi sir/mam, How to import data to excel using jsp without retrieving database.   friend, you can't import excel data into the middle of an HTML pages (your JSP will result in an HTML page
Fileupload from source path to destination path
Fileupload from source path to destination path  first we will create... source path &Destination path fields and BOTH INPUT TYPES ARE "TEXT" we will give source path as statically where the .doc or .rtf files path will be their.and
How to insert rows from Excel spreadsheet into database by browsing the excel file?
How to insert rows from Excel spreadsheet into database by browsing the excel file?  I want to insert rows from excel sheet to database.for this i... the excel file using file browsing dialogue through form in JSP. How can i select

Ads