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>









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 box
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
Getting File path error - JSP-Servlet
Getting File path error  I have a requirement where i need to get certain properties on application login page start itself. I an currently using String str = request.getRealPath("/")+"a" + System.getProperty( "file.separator
difference from browser to browser - JSP-Servlet
difference from browser to browser  I am developing a project in jsp. When browse in mozilla it works good and when I open it with IE there is a difference how to overcome this problem.Thanks in advance
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
read excel data from jsp - JSP-Servlet
read excel data from jsp  Hi how to read excel file from jsp? Excel file is created manually entered data having many sheets? and read the entire sheet and also edit with jsp? pls suggest me?   Hi Friend, 1
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
retrieving of value from excel file - JSP-Servlet
that excel sheet i.e this matter will take a para meter values from the excel...retrieving of value from excel file  Dear sir, Thanks for sending a code now i am getting a particular column values i.e EmailId column for sending
retrieving of value from excel file - JSP-Servlet
that excel sheet i.e this matter will take a para meter values from the excel...retrieving of value from excel file  Dear sir, Thanks for sending a code now i am getting a particular column values i.e EmailId column for sending
getting values from database - JSP-Servlet
getting values from database  I tried the following code abc.html aaa.jsp I am not getting exceptions now. But I am not getting output also. Plz help.   Hi Friend, Run your
retrieving of value from excel file - JSP-Servlet
retrieving of value from excel file  Dear sir, Thanks for sending a code now i am getting a particular column value i.e EmailId column for snding a massmails,now i have to get a particular column values i.e Name(A),EL(B
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
getting contacts from gmail - JSP-Servlet
getting contacts from gmail  hi there, would you please tell me step by step how can i integrate the gmail contacts with my web application. please reply me asap. I'll be greatfull to you. Rajesh
to run html code in web browser - JSP-Servlet
to run html code in web browser  how to run jsp file which calls html file on web browser??  Hi Friend, Try the following code: 1)form.jsp: Enter Name: 2)welcome.html: Add Profile Edit
To download a website from a given url. - JSP-Servlet
To download a website from a given url.  write a program to download a website from a given URL.it must download all the pages from that website.it should take the depth of retrieval from user input.all the files pages must
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
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
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
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
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
PHP Open Excel File in browser - PHP
PHP Open Excel File in browser  How we can open an excel file using PHP code. I don?t want to let the user to download it rather I would like to get it open in the web browser. Any help would be great. Thank you very much
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 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
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 ... will retrieve the data from database, create an excel file and data insert
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 coords from an image.
getting coords from an image.  how to get coordinates dynamically(in run time) from an image?? pls help me
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
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
Jsp Absolute Path
The Tutorial illustrate an example from 'JSP Absolute Path'. To understand JSP... Jsp Absolute Path   ... the absolute path in jsp. The absolute path is the full path that contains the root
download a file from browser - Java Beginners
download a file from browser  How to download a file from browser and save it in local path
path setting - JSP-Servlet
path setting  Hi, friends How to set the oracle 10g path on browser to servlet program
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
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
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
get values from Excel to database
get values from Excel to database   hi i want to insert values from Excel file into database.Whatever field and contents are there in excel file that should go to database which exists. am using SQL Server management studio
JSP Current Path
illustrate an example from 'JSP Current Path'. In this section, you will learn how to get the current path of the jsp page. You can see in the given example that we... JSP Current Path   
browser - JSP-Servlet
. But, while getting this page from the arrow mark or getting from the history...browser  Browser buttons In a website program with login and session concept, logout option is working properly in JSP pages. While
Storing content from file path to an array
Storing content from file path to an array  Hi, I have a path... would like to access the "Animation.txt" file from this path and store the contents in this text file to an array. I am using jsp. I can access my path but how
Getting data from servlet into javascript
Getting data from servlet into javascript  How do i get json data from my servlet on to a variable in javascript n bind the data to display onto sigma grid.Has anyone Idea how to do
How to retrieve file name and path of an excel spreadsheet imported into Oracle Database
How to retrieve file name and path of an excel spreadsheet imported into Oracle Database  I imported an excel spreadsheet using sql developer into my Oracle database and I want to know how to retrieve the path of the file