Updated! Embedding Excel Web App in your own web page or blog


image

 

Today’s blog post is brought to you by Dan Parish a Program Manager on the Excel Web App team.

 

New! See the end of this post for updates on how to embed.

One of the feature requests we frequently get for Excel Web App is “it would be great if there was a way to embed my workbook in my blog”. Well, starting today, if you have an Excel workbook (xlsx or xlsb only) or a PowerPoint presentation on SkyDrive, you can embed them! In fact, the following embedded PowerPoint presentation will show you how:

There is also a help article (referenced at the end of the presentation) that contains all of the details of how to embed an Excel workbook.

 

Once you’ve chosen to embed an Excel workbook on SkyDrive, you’ll see the default embed code and a preview of what it will look like on the embed page:

You don’t have to stick with the default embed code though, since the embed code for Excel Web App is also customizable. The embed page contains a link to a help article that shows you how you can customize the embed code to get the embedded workbook to look and behave exactly how you want it to. For example you can have the embedded viewer show only a particular item, you can set the active cell, and you can modify the types of interactivity that are allowed such as sorting and filtering, or typing.

Excel workbooks that are embedded are still “live”, so whenever you update the source workbook, the embedded viewer will display that updated content as well. However, modifications that people make in the embedded viewer are always personal and temporary (only for that browser session), and so don’t affect the underlying workbook itself. This allows people consuming your content to explore it themselves without changing it for everyone.

Let’s look at a few examples of how you can use an embedded Excel Web App in your blog. Let’s say you are on a diet, and want to use the power of peer pressure to keep you on it. So you weigh yourself weekly, plug the result into an Excel workbook, and chart your progress. Now you can put that chart in your blog for your friends and family to see, just like so:

The embed code for this looks as follows:

<iframe src="http://r.office.microsoft.com/r/rlidExcelEmbed?su=-3211708242785571568&Fi=SDD36DB85E9A926D10!108&AllowInteractivity=False&Item=WeightChart" width="385" height="335" frameborder="0" scrolling="no"></iframe>

 

Note that I’ve changed the URL provided by the embed page as shown in red. I’ve specified a specific item to display using the Item parameter, which in this case is the name of the chart. I’ve also customized the height and width of the IFRAME to make it fit my chart perfectly.

 

So everyone loves your chart, but you continually get requests for how to calculate BMI as well. You’ve already created a workbook that does just that, so now you can simply embed it in your blog and point people there so they can use it too:

The embed code for this looks as follows:

<iframe src="http://r.office.microsoft.com/r/rlidExcelEmbed?su=-3211708242785571568&Fi=SDD36DB85E9A926D10!107&AllowInteractivity=True&AllowTyping=True&Item=BMICalculator&ActiveCell='BMI Calculator'!G4" width="440" height="615" frameborder="0" scrolling="no"></iframe>

 

Note that in this example I’ve used every option that the embedded viewer has: I’ve enabled interactivity which is required to enable typing, I’ve enabled typing to allow people to fill out their height and weight, I’ve specified a specific item to render which in this case is a named range, and I’ve set the active cell.

 If you’d like to see the full workbook an embedded viewer is based on, you can click the  icon, which will navigate you to the public workbook on SkyDrive.  If you’d like to re-embed an embedded workbook, you can get the code to do that too by clicking the icon.

 We hope you enjoy this new functionality, and please leave any comments and/or questions in the feedback section!

 

New! How-tos, examples, and ideas

 

 

Office Blogs Comments

Comments: (22) Collapse

  • Just went to try this out, and no sign whatsoever of an 'embed' option for spreadsheets in my public folder. Is this yet another US-only Office tweak?

  • Angus, this feature is currently available in Australia, Austria, Belgium, France, Germany, Russia, and Switzerland (in addition to countries we're already live in: US, UK, Canada, and Ireland).

  • Wow! That works great! I tried it out with a simple distance calculator on a non-public website. I will refine that a bit and blog about it next weekend.

  • Very cool. I wonder if slicers work...

    BTW, 205# @ 6'4" is "overweight"?!?!?

  • I can get it working with Excel,but not with Powerpoint. But I'll keep trying...

  • Next problem

    It says there is no access to the VBA project.

    Does that mean no live macros in the live spreadsheet?

    Please say no.

  • @Doug While the Office Web Apps will load files that contain VBA macros, they cannot be run on the server.

    One alternative, if you have Excel Services on SharePoint, is to use the other programmability methods that are available such as the Web Service API, the JavaScript Object Model, and User Defined Functions.

  • Dan,

    Maybe it is off topic but you mentioned SharePoint so I will ask anyway. Is it possible to post an example of a VBA program that updates or inserts an entry of a SharePoint (2007 or 2010) list via Web services (with CAML I guess)? For updates, one can assume that the ID can be taken for an Excel cell.

  • Dan - that's very disapointing.  If it is intended to provide this functionality in the future I hope it will be treated as a priority, and if that is not the intention then I hope that decision will be reviewed.

    Embedded spreadsheets with macros are very exciting; without they are a bit ordinary.

  • Nice!

    When will it be available for us mortals in Scandinavia?

    TIA,

    Dennis

  • I've been waiting for something like that!

    When is this available in The Netherlands? (and why the heck IS this limited by country in the first place)

  • @XL-Dennis and @Jan:

    Office Web Apps are currently available to all users in US, UK, Canada, Ireland, Germany, France, Austria, Switzerland, Belgium, Russia, and Australia.  Office 2010 users in other countries also have access (as long as Office 2010 is available in that language).  Non-Office 2010 users in other countries will get access in the coming months.

  • Dan,

    Thanks for coming back to us :-) I'm not sure that I understand You correctly:

    [quote]

    Office 2010 users in other countries also have access (as long as Office 2010 is available in that language)

    [/quote]

    I'm running Swedish version of Office 2010 and Windows 7 (both x64 and x86). In addition, I test it on my Swedish site where my ISP is running their servers locally. In other words; it cannot be more localized than that. But still I'm not able to resolve it?

    Thanks in advance,

    Dennis

  • Have tried it on my site. Works well. ActiveX controls and data validation lists do not work, but I found that these can be replaced with slicers to make a nicely interactive worksheet. Cool.

  • @XL-Dennis Are you having issues accessing the Office Web Apps on SkyDrive, or just using the embed functionality?  I'm assuming the former.

    Though the Office Web Apps are only available for everyone in the markets I stated above, people outside of those markets that own Office 2010 can get access to them (and hence the embed functionality) by going to http://office.live.com and signing in from a machine with Office 2010 installed.  Alternatively, you can upload a file to SkyDrive from an Office 2010 client.

    Once you do that, you should be able to (from http://office.live.com) click on a file and view and edit it in your browser, and then also follow the steps in the PowerPoint presentation above to embed it.

    Please let me know if you have any issues with that, and if so, exactly what the problem was.

    Thanks!

1 2  Next >