aspose file tools*
The moose likes Java in General and the fly likes Using JExcel API to create Excel sheet. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Using JExcel API to create Excel sheet." Watch "Using JExcel API to create Excel sheet." New topic
Author

Using JExcel API to create Excel sheet.

Nisha gowda
Greenhorn

Joined: Feb 23, 2010
Posts: 9
I have written a class for creating excel sheet using jexcel API.

As of now I am hard coding the path of excel sheet eg c:\sample.xls. And the excel sheet is getting generated in c drive.

My requirement is that I should only set the name of the excel sheet and when I execute the program it must popup the "file download" box which asks whether we want to save the file or open the file with selected program.


Could you please help me in enabling this feature?


Thanks,
Nisha
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Is this a web app or a desktop app?
Nisha gowda
Greenhorn

Joined: Feb 23, 2010
Posts: 9
Web App
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
You'd use a Content-Disposition header; see http://faq.javaranch.com/java/JspAndExcel
Nisha gowda
Greenhorn

Joined: Feb 23, 2010
Posts: 9
Thanks for the info.. Can you please let me know how to enable same feature if it is desktop application? Its just for my knowledge
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Just pop open a FileDialog or a JFileChooser and ask the user where she wants to save it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using JExcel API to create Excel sheet.