2

My project is based on Node.js (backed end) and AngularJs (front end), so I want to open Office files (.doc .ppt and so on) into my web page. My files are stored into Amazon s3 server. I want to to open these files into my web page.

So I need similar kind of functionality like google drive have for viewing the files.

Any Idea?

Ishan Thilina Somasiri
  • 1,179
  • 1
  • 12
  • 24
arun kamboj
  • 1,145
  • 4
  • 17
  • 48

1 Answers1

3

If you want to view only, you can use Google Documents' Viewer via an <iframe> or Microsoft Office 365 viewer via an <iframe>.

<iframe src="http://docs.google.com/gview?url=http://remote.url.tld/path/to/document.doc&embedded=true"></iframe>

or

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=http://remote.url.tld/path/to/document.doc' width='1366px' height='623px' frameborder='0'>This is an embedded <a target='_blank' href='http://office.com'>Microsoft Office</a> document, powered by <a target='_blank' href='http://office.com/webapps'>Office Online</a>.</iframe>

Solution obtained from How do I render a Word document (.doc, .docx) in the browser using JavaScript?

Ishan Thilina Somasiri
  • 1,179
  • 1
  • 12
  • 24