This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes importing data from database to excel sheet through JExcel Api Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "importing data from database to excel sheet through JExcel Api" Watch "importing data from database to excel sheet through JExcel Api" New topic
Author

importing data from database to excel sheet through JExcel Api

akki gupta
Greenhorn

Joined: Nov 01, 2011
Posts: 9
Hey,
I want to import data from my database to Excel sheet through JSP using JExcel API.....but after creating a workbook using Workbook workbook=Workbook.createWorkbook(new File("myfile.xls")); it is not appearing in the working directory....I'm new to this.....Please help....
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

it is appearing in the working directory

if this is the problem then, to save this file under your desire directory just defined the path before the file name.





Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
akki gupta
Greenhorn

Joined: Nov 01, 2011
Posts: 9
sorry it was a typing mistake.....it's not present in the working directory.......
akki gupta
Greenhorn

Joined: Nov 01, 2011
Posts: 9
Is there some problem with the code???
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

In a web application there is no such thing as a "working directory". You must explicitly place this file where you want it to go.

And, using a JSP for this type of processing is a really poor practice. Code such as this belongs in a JAva class, not a JSP (which, in 2011, should never have any Java code within it).


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: importing data from database to excel sheet through JExcel Api
 
Similar Threads
how to get the contents from excel file-using jxl api
importing data from database to excel sheet through JExcel Api
jxl package doenot exists
JExcel API and Servlet - File upload
web app. using MySQL 4.0, JSP, Tomcat & Jexcel