File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

importing data from database to excel sheet through JExcel Api

 
akki gupta
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1324
Android Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.




 
akki gupta
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry it was a typing mistake.....it's not present in the working directory.......
 
akki gupta
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there some problem with the code???
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic