Skip to content

Instantly share code, notes, and snippets.

@davidonlaptop
Created March 13, 2018 20:10
Show Gist options
  • Save davidonlaptop/41f3a81af8e5a1b4415759f2a33be3ca to your computer and use it in GitHub Desktop.
Save davidonlaptop/41f3a81af8e5a1b4415759f2a33be3ca to your computer and use it in GitHub Desktop.
Render XLSX within the browser
<style type="text/css">
html,
body,
iframe {
width: 100%;
height: 100%;
}
</style>
<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=https://download.microsoft.com/download/1/4/E/14EDED28-6C58-4055-A65C-23B4DA81C4DE/Products.xlsx' width='100%' height='100%' 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>
<!--
// Using Microsoft Office 365
https://stackoverflow.com/questions/27957766/how-do-i-render-a-word-document-doc-docx-in-the-browser-using-javascript
// Using google
http://docs.google.com/gview?url=http://remote.url.tld/path/to/document.doc&embedded=true
// Caveats:
- Document MUST be publicly accessible
- License ???
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment