tags:

views:

34

answers:

2

The requirement is as follows

1.) Upload the word file on website

2.) Display word file on website with the same formatting as we upload

3.) Edit and save the word file online on web

4.) Download the changed Wrod file from website (word file Format should not changed)

How to achieve this requirement.

+1  A: 

I think you've got a lot of research to do. :) I'm going to suggest a few leads on the integration side, and then a way to solve your problem in code.

The code route seems painful, although it may be easier than I'm expecting. Still, I would only go there if integration fails to meet the requirements.

Office Web Apps

The very first thing I would look into is Office Web Apps which might completely solve your problem, end-to-end. You will be an early adopter if you go that route... It isn't out yet. :) However, it's replacing Office Live Workspace, and that's also a lead.

Google Docs, SharePoint, Open Document Format

Failing that, I think you might be able to do this by embedding Google Docs, which supports importing and exporting of Word documents and has a web-based editor. This depends on your requirements.

SharePoint is also a possibility, although if you aren't already using it, it's very enterprisey which makes it a bit of a bear. Here's some reading material:

Google Docs

Google Docs Embedding

SharePoint

Also... Microsoft is making a big deal about how Office 2010 supports the Open Document format. That opens up additional doors as far as online editing goes: List of Editors. If one of those options is incredibly flexible it might work. Google Docs is on that list, of course. I don't know what the API is like, but that seems like a promising option.

The Hard Way

Failing everything, you could do it the hard way. This will give you the most control but it might be one of those things where it takes three weeks to get the last 10% of the project finished due to a bunch of edge cases. And you will probably end up only supporting a limited subset of Word's total display features.

Word docs have a 'save as html' feature. It might be a lot of work, but you may be able to pull it off from that angle.

I know there are ways to automate the HTML conversion, however the HTML word emits will be hard to work with. Third party tools exist that might do a better job. Microsoft has also made some effort to provide tooling around cleaning up the exported HTML so I would Google that.

Once you get clean HTML, you could take the uploaded HTML and feed it into a web-based html editor.

After that, you can re-create a new word doc from the resulting HTML and download it to the user.

Of course, there are three areas in this process where things could go wrong and there will be some features of Word that will not survive the trip. I'm using OFfice 2010 now and things like glow effects seem challenging. You might spend a lot of time getting even the basics just perfect.

Good luck, and please share your results!

Brian MacKay
A: 

I have been looking for a similar solution for a long time too. Currently Office Web Apps seems promising, but it's quite costly and unfortunately at this moment has nearly no developer support.

Another option I found is the Telerik Silverlight RichTextBox, supports editing docx (currently in beta). See: http://demos.telerik.com/silverlight/#RichTextBox Very promising too.

P.S. I'm not a Telerik employee, just a happy customer.

Martin de Ruiter