File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Using jxl apis for prompting user to enter location for excel sheet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Using jxl apis for prompting user to enter location for excel sheet?" Watch "Using jxl apis for prompting user to enter location for excel sheet?" New topic
Author

Using jxl apis for prompting user to enter location for excel sheet?

J Lalit
Greenhorn

Joined: May 19, 2008
Posts: 15
Hi,

I am using alfresco 3.1.1 over jboss 4.3.2 ga.Here i have a requirement that user should see a link to export content which is there in content repository & which he should see in a tabular form to be exported to an excel sheet.For this i am using JXL apis.Its working in windows as i am putting some location under c:\ drive as location for the sheet.But our production environment is Linux & this logic is not working there.So i want that when user clicks on export link he should either see a file pop up which asks him to put a location for the sheet which he can browse like my documents or my computer , name the sheet & click on save , it should save the sheet at that particular location or he should see a download pop up with some predefined excel sheet name & prompts user to either open or save it as usually happens while we download some item from internet.
I am googling for it but not got any help till now.Can anybody help me out for this?


Thanks & Regards
J Lalit.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39544
    
  27
You'll need to set the Content-Type and Content-Disposition headers. The former should be something like "application/vnd.ms-excel", and the latter maybe "attachment; filename=\"myTable.xls\"".

Of course, the user may have set her browser to silently save downloads; in that case, she'll never see the popup dialog (but you can assume that she knows what she's doing, so all is well).


Ping & DNS - updated with new look and Ping home screen widget
J Lalit
Greenhorn

Joined: May 19, 2008
Posts: 15
I may try this : create excel sheet using jxl apis & place it at a temporary location on server & then invoke a servlet which will dump the sheet from that temp location to user specified location using file store pop up which prompts user for location to store file say “My Documents” & then delete the sheet.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using jxl apis for prompting user to enter location for excel sheet?
 
Similar Threads
Any idea on Export an Excel Sheet in GWT
Using JExcel API to create Excel sheet.
Creating a download Link in Servlet
opening .xls file
Downloading Excel File