How to embed Excel sheet, workbook in webpages, specially in wordpress?
Well, its dead simple! There are wordpress plugings for this, specially one that lets you host your files (PDF, PowerPoint, Excel, or MS Word etc) directly into your media by uploading it to your site or simply link to it from anywhere on the web and then show the contents using Google Drive’s document viewer. It doesn’t require you to have a Google account or host the file to Google Drive. If you are looking for a plain solution like this, you might check the plugin Google Doc Embedder on WordPress Plugin depository. Check the end of this post for a complete list of supported file types by Google Doc Embedder.
However, I am kind of against using another plugin for this. If you have been using wordpress for a while, you know what I mean. So I looked for a direct solution and a way to interact with the file, specially in Excel, sort of user input and then return the calculated results. Good news is, Microsoft itself provides the solution with the Microsoft Excel Web App and I am impressed which is rare about Microsoft. They provide a detail how-to with pictures on their Office support blog. The beauty of using the Microsoft Excel Web App is you can make it completely interactive as if you are using the workbook from your desktop. And no, it doesn’t change the cell values with the user input if you are concerned like I was when I first found out.
- Here is two posts on Microsoft Office site on this:
Below is the example of embedding excel into wordpress website using SkyDrive’s Excel Web App. Turns out older version of excel format doesn’t support customized embedding features though it gives you the embed code on iframe. Forst O tried with Excel 2003 format .xls and it only showed the excel file thumbnail linking to the downloadable file. However it worked just fine with 2013 format .xlsx. With this format you can use custom parameter to enable/disable Interactivities like filtering, sorting etc. typing, default select cell, download button etc. I used the following parameters for the example below:
wdAllowInteractivity=False AllowTyping=True ActiveCell='TableName'!CellNum Item='TableName'!CellRange wdHideGridlines=True wdDownloadButton=True
You can either customize your iframe after getting the basic embed code from SkyDrive or customize while generating the embedding code in the first place. Here is a good documentation on Customize how your Excel workbook is embedded from Microsoft Office Web Apps Support site.
PV Calculator 1
PV Calculator 2
List of all the file types handled by Google Doc Embedder plugin for WordPress: