File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Save to excel-take path from user Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Save to excel-take path from user" Watch "Save to excel-take path from user" New topic

Save to excel-take path from user

Tapas Chand
Ranch Hand

Joined: Dec 29, 2009
Posts: 370

i am saving some records in an excel file on click of a button
currently i am hardcoding the path like

but i want to take the path from user,i.e.,something like 'save as' option
how can i do it?
please help.
Thanks in advance.
David Newton

Joined: Sep 29, 2008
Posts: 12617

Use a form field?

Note, however, that you, the server-side web application, cannot write to arbitrary locations on the client-side (browser) hard drive. If you want the user to be able to save the file anywhere then you need to have the user (browser) download the file.
It is sorta covered in the JavaRanch Style Guide.
subject: Save to excel-take path from user
It's not a secret anymore!