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?
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).
Joined: May 19, 2008
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Using jxl apis for prompting user to enter location for excel sheet?