Most Valuable Professional

View Jan Karel Pieterse's profile on LinkedIn subscribe to rss feed
Subscribe in a reader

Subscribe to our mailing list

* indicates required

File crashes Excel!!

Save my workbook!
The best tool for salvaging problematic workbooks.


Excel VBA Masterclass (English)
Excel VBA for Financials (Dutch)

Third party tools

Speed up your file

The best tool to optimise your Excel model!

Repair your file

Stellar Phoenix Excel Repair
Best tool to repair corrupt Excel sheets and objects
Home > English site > Articles > Excel Web App Mashups > Preparations
Deze pagina in het Nederlands

Creating webpages with Excel Web App mashups

Prepare an Excel file to create a Mashup

First of all, you need to create a file on your skydrive which is public, i.e. everyone can "see" that file. Alternatively, you can also create a public folder. All files in that folder can be viewed by anyone.

Skydrive folder

A folder in my Skydrive.

Once the file is uploaded, check the box just before its name and then click the "Embed" link shown in the screenshot above.

The window shown below opens up:

The second embed screen

The embed screen

If you want to embed a static file and do not need to change the size of the box the embedded file will be in on your page, just click the Copy link highlighted in the screenshot. The code will look similar to this:

<iframe title ="Preview" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" width="402px" height="346px" style="padding:0;background-color:#fcfcfc;" src="!285&ak=t%3d0%26s%3d0%26v%3d!AJHqJpkd-Q5axR8&kip=1"></iframe>

More often however, you will want to change some settings, such as whether or not the visitors of your site can interact with the file. Click the "Customize this embedded Excel workbook" link highlighted above. Another screen pops open:

Customize embedded Excel workbook dialog

The Customize embedded Excel workbook dialog

I have put a red rectangle around some parts of this screen. The top box has the items in your file which you can select. The Excel Web App will only show the item you select in the embedded file on your website. Very convenient if you only want to show a chart.

The second box highlights one of the interaction restrictions you can put into action.

Once you have the settings you need, you can copy the needed HTML code from the textbox at the bottom. Note the JavaScript link; this is what the rest of this article will use to build communication between the web page on the client and the Excel web app control.



All comments about this page:

Comment by: illnino (12/19/2011 7:11:15 AM)

Hi, Jan

I couldnt find the way to get file token. You mentioned in your second post(embeddedexcel02.asp). The method could be found in this page. But I could only find something similar

<iframe width="402" height="346" frameborder="0" scrolling="no" src="!1357&ak=t%3d0%26s%3d0%26v%3d!ADMak9JFq12jrXE&kip=1&wdAllowInteractivity=False&wdHideGridlines=True&wdHideHeaders=True&wdDownloadButton=True"></iframe>

File token:SDB4A3FCAC9C7848C9!285/-5430218907388983095/t=0&s=0&v=!AK3ybHnbJCLh5H0

May you please help?


Comment by: Jan Karel Pieterse (12/19/2011 8:11:00 AM)

Hi Illnino,

Best is if you click on the JAVAScript link shown in the last screenshot shown above. The filetoken will be listed in the JAVAScript. Click the Copy link and paste the copied script into e.g. Word so you can easily see the JAVAScript code. Look for a line like:

// Use this file token to reference the skydrive file in the Excel APIs
var fileToken = "SDB4A3FCAC9C7848C9!285/-5430218907388983095/t=0&s=0&v=!AJHqJpkd-Q5axR8";


Have a question, comment or suggestion? Then please use this form.

If your question is not directly related to this web page, but rather a more general "How do I do this" Excel question, then I advise you to ask your question here:

Please enter your name (required):

Your e-mail address (optional but if you want me to respond it helps!; will not be shown, nor be used to send you unsolicited information):

Your request or comment:

To post VBA code in your comment, use [VB] tags, like this: [VB]Code goes here[/VB].