Open excel/word document from ASP.NET in Office Web Apps to edit?

By : gnychis

I have an ASP.NET web application hosted on Azure for use internally by our company. On this site, I keep a few spreadsheets and word documents that I would like employees of the company to be able to click on, and have them open directly in Microsoft's Office Web Apps where they can view and edit them. This is very similar to being logged in to SkyDrive and clicking on the file. Here is what I'm looking for:


  1. The user should be able to edit the documents directly in their browser and save them.

  2. My ASP.NET web application should be able to obtain a list of the documents and display them.

  3. My ASP.NET web application should be able to allow users to upload new documents

  4. The user should not have to login more than once (i.e., they should only have to login to our internal ASP.NET web application).

What I've tried: I cannot seem to figure out how to do this though, here are a couple things I've thought of and tried.

  • Using SkyDrive + API: Keeping the documents in SkyDrive, sharing them across employees, and using the SkyDrive/Live API to log them in and open the documents. This doesn't work for us because SkyDrive does not allow you to share documents without making them completely public (i.e., anyone with the link can view/edit them). They must be kept internally.

  • Using SkyDrive Pro: SkyDrive pro has the benefit of better sharing credentials. You can share something with a particular user, and only that user (i.e., they need to be logged in to view/edit it). Unfortunately, SkyDrive Pro is not supported in the Live API so I cannot access the files directly from my ASP.NET application.

  • Sharepoint: I think a possibility is SharePoint by keeping the documents in a Document Library and a using SharePoint Client. I think I can specify user credentials to obtain a list of documents in the Document Library, but I'm not sure that I can "open" one of those documents in the Office Web within their without bothering them to login to the SharePoint site again, and again. Especially if their own personal login times out? I have to re-enter my SharePoint password constantly using SharePoint in my browser, I do not want this when integrating with our ASP.NET app.

It would be great if Microsoft integrated the Office Web Apps in to Azure, potentially allowing you to open Excel and Word documents stored in Blob Storage. But that's not possible.

Anyone have any other ideas?

By : gnychis


tl;dr Google Apps/Drive.

Google Drive allows you edit and save documents directly from the browser.

Google Apps provides an API for Google Drive (Also for .NET), so you can obtain a list of the documents, display them and allow users upload new documents.

You can manage service accounts owned by your app. you can use openID / SSO, so the user wouldn't have to login more than once.

The disadvantage is that documents in GDrive not exactly same as in MS office.

By : MeNa

If the mentioned SkyDrive/Office365 API cannot be used, I believe it is possible to implement such a functionality with the use of 3-rd party libraries (Aspose, DevExpress, etc.) intended for office-like document processing visualizers (free or commercial analogs).


  • The following demos:

Excel Editing

Word Editing

  • And this StackOverflow thread, which may be helpful in your scenario.
By : Mikhail

You can definitely use Office Web Apps for this. First, you have to have an Office Web Apps farm. Second, you need to implement the WOPI interface. There are code samples and github references on this msdn blog.

WOPI Framework only supports ASP.NET WOPI Servers. The WOPI Framework is mainly just a set of C# classes to simplify WOPI Server programming and encapsulate the protocol complexities. The same approach could be used to deliver a WOPI Framework for other development platforms, such as Node.js.

This video can help you solving your question :)
By: admin