This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes edit and save word and excel documents from browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "edit and save word and excel documents from browser" Watch "edit and save word and excel documents from browser" New topic
Author

edit and save word and excel documents from browser

Michael Celaya
Greenhorn

Joined: Dec 21, 2005
Posts: 18
Hi!
We have a web site with lots of links to word and excel documents. We want to achieve this: when a user opens one of these documents he must be able to edit and change whatever he wants to, and then save the changes in the document(in the server).
How could we do this?

Thanks a lot for any help given.
[ December 21, 2005: Message edited by: Michael Celaya ]
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
He/She has to modify it and then upload it back to the server. This is the only solution I know. And no other way I can guess.

About how to upload a file using servlet/JSP, you can check out the Servlet FAQ or JSP FAQ here at Ranch.

Cheers.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

If I were building a system whose purpose was to facilitate Microsoft document management, Java wouldn't be my first choice of language. I would look at buying a document management system instead. However if you're committed to building rather than buying, then I believe WEBDAV might be worth looking into. (I don't know much more about it than what it's name means.)
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Jakarta Slide is a WEBDAV implementation. I haven't used it but it may help.

Tomcat also ships with a lightweight WEBDAV app.
I haven't used that either but you may want to look into it.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Michael Celaya
Greenhorn

Joined: Dec 21, 2005
Posts: 18
Thanks a lot for your fast replies, if I find some solution in webdav I'll post the results.
Cheers.
Michael Celaya
Greenhorn

Joined: Dec 21, 2005
Posts: 18
Hi, merry chrismas to all, but now back to work.

I tried to do what you told me and I have installed jakarta slide (I think so) with the tomcat server. Using the webdav explorer I have written a html page with a link to a word document, but I still can't save the document. When I try to save the document, my only choice is to save copy as.. (I have tried with the save button in the tool bar, but it doesn't work). I think slide is installed properly, I have the folder in the server, the doc folders too... so I really don't know what happens, maybe is not the solution I was looking for.

Could anybody help me?
Advanced thanks, people here is great!
Vasudhaiv Naresh
Ranch Hand

Joined: May 13, 2005
Posts: 57
hi Michael,
we have done something similiar to your task.
We have made use of an applet which downloads the file to a temporary folder, and uploads it back when the user is done with modifying the document. The applet tyhen deletes the temporary file from the client's system.
Note that, here the user is not at all aware that a file has been downloaded and deleted to/from his system.
Hope this might be useful in some way.
Regards,
Naresh
Michael Celaya
Greenhorn

Joined: Dec 21, 2005
Posts: 18
Hi Vasudhaiv!

Thanks for your reply, I was resigned to use a "not ideal solution" using davexplorer, but that isn't the exact solution, the one you propose looks much better, but I'm rather ignorant with applets, I've only worked with ASP and JSP and Servlets in web technology.
Would you mind to tell me how to use the applets, and if you don't care, how you do that with your applet?

Even if you can't, thanks for the information.
Dave Brown
Ranch Hand

Joined: Mar 08, 2005
Posts: 301
I'm not an expert in open office yet but I know you can use it in a browser and communicate with it via an applet. So perhaps using open office you could accomplish this.


Regards, Dave Brown
SCJP 6 - [url]http://www.dbws.net/[/url] - Check out Grails Forum
Michael Celaya
Greenhorn

Joined: Dec 21, 2005
Posts: 18
Thanks Dave, but I dont't think there is a chance to change from microsoft office to open office just for this site. Maybe I should have explained this before. I'm doing my "end of career project" of informatic technical engineering(speciality on management)-this is in Spain, but I think in US and UK is named in another way- and my work is to fix a little website they have in a local folder and prepare it for the server. My actual task is to make possible the edition and saving at the server from the browser. Oc4j is the server to be used, but if I can't use Vasudhaid's solution with the applet I'll try to convince them using Tomcat, but I think there's no chance to use IIS or make big changes on the organization's structure.

Regards
Michael Celaya
Greenhorn

Joined: Dec 21, 2005
Posts: 18
Hi it's me (again).

I've found an applet in this javaranch page:

This is supposed to write the file to a temporary directory and then open the document in msword. When I tried first the appletviewer started and the applet wrote the file to a local directory, but then displayed Runtime Process error=2.So msword didn't start. I think the file paths were wrong, because I've changed them and doesn't display any message...but even the appletviewer doesn't start. Could anybody explain me what happens? (I'm using jdeveloper 10g and my OS is Windows NT-sad but true-)

Thank you all.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Michael Celaya:
Maybe I should have explained this before. I'm doing my "end of career project" of informatic technical engineering(speciality on management)-this is in Spain,......


It's a little off-topic but since you brought it up....
What is an "end of career project" exactly?
The wording makes it sound like the last project you will embark on before retiring but the context makes it sound more like an end of term/work study project.
Michael Celaya
Greenhorn

Joined: Dec 21, 2005
Posts: 18
Sorry, I have to improve my English. It wasn't "end of career project",but "technical degree end project". I've fixed my problem with the applet, but it only opens it from the local system. I have read that the applets have no permission to write in the client's filesystem, but I think that this can be configured somehow, does anybody about this?

Thanks a lot.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41182
    
  45
Yes, applets have to be especially enabled to access the local file system. There are two ways to do this, signing the applet and changing the local security policy; this page explains them both.
If you have further questions specific to applets, it's better to post a follow-up question in the applets forum, than to let this thread stray further afield.


Ping & DNS - my free Android networking tools app
Michael Celaya
Greenhorn

Joined: Dec 21, 2005
Posts: 18
Thank you, I'll post a new topic in the Applets forum if I'm in trouble...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: edit and save word and excel documents from browser
 
Similar Threads
How to open other windows application through java??
Help required for identifying classes
Using jxl apis for prompting user to enter location for excel sheet?
Compatibility
Looking for web-based generic file viewer software