-1

I want to display the contents of a Word file in html without installing the software. How can I display files like. docs or .xlsx on my web page?

<embed src="testdoc.docx"  />
AFJA
  • 49
  • 1
  • 3

2 Answers2

0

Check this answer: How do I render a Word document (.doc, .docx) in the browser using JavaScript?

It's pretty old. But for what I know of you still cannot do it.

However, it's a little different with excel files. If you convert it to CSV you can use xmlHttpRequest, see this answer: Display CSV file in HTML

0

Currently there is nothing to render .doc or .xls file in the browser. However you can use frames and Google Doc.to show/display the content of document

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