Click here to Skip to main content
13,552,693 members
Rate this:
Please Sign up or sign in to vote.
See more:
how to open office documents eg. .doc, .ppt files on web browser
I tried it but those file get downloaded
I dont want to download file just open it on web page
is there any api for that
Posted 1-Feb-13 17:11pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Just be logical: on a client side, the user can only see the site through the browser. In general case, the user don't have any software supporting office files, which are proprietary. These days, there are standards for those file formats, but it does not change the situation: the users' computers don't support them.

But, on server side, it depends. You can support them. But of course, forget "I don't want to download". Obvious, isn't it?
And you cannot present office files directly, by the reason I explained above. There is a number of sites which support office files. The presentation of the content should be simulated. Usually, with HTML.


Tushar Vayangankar asked:
What is Microsoft.Office.Interop, how it works?
When you install Microsoft Office, among other things, you got primary Microsoft.Office.Interop assemblies installed in the GAC (Global Assembly Cache) of your local system. You can reference those assemblies and used them to, basically, create, open and modify Office Documents.

Also, these assemblies can be redistributed; see for example,[^].

To reference the assemblies, as they are strongly named and installed in GAC, you need to reference them by names. So, in Visual Studio, you add a reference from the ".NET" tab of the "Add Reference" window. The assembly names are, Microsoft.Office.Interop.Word, Microsoft.Office.Interop.Excel, Microsoft.Office.Interop.PowerPoint, and so on. Each such assembly comes in different versions, depending of the versions of Office and .NET Framework installed.

Please see, for example:[^],[^].

You will find such MSDN help pages on every Office product, separately.

In principle, there are 3rd-party products working with Office files, which would allow your to work without installation of Microsoft Office. If you are interested, I can advise the references, or you also can find them in available CodeProject answers.

tushar-vayangankar 2-Feb-13 0:34am
what is Microsoft.Office.Interop
how it works
SAKryukov 2-Feb-13 16:28pm
Please see my updated answer, after [EDIT].
If you agree that I reasonably answered your question, please accept it formally (green button) — thanks.
CaBrisk 3-Feb-13 0:55am
SAKryukov 3-Feb-13 13:12pm
Thank you, Edo.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can't show a powerpoint document directly in a web browser natively. What you can do, however, is convert each slide of the powerpoint presentation to an image and then display the images as a slideshow on the client.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.180515.1 | Last Updated 2 Feb 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100