Make an interactive mashup on a web page you’ve created by programmatically embedding an Excel spreadsheet on the page. Microsoft Excel Web App generates a JavaScript snippet that you paste into the HTML of your web page. The JavaScript snippet consists of an HTML div element that displays the spreadsheet and a script element that sets options for appearance and interactivity. You can add your own code to programmatically manipulate the embedded spreadsheet. For details, see Using the Excel Services JavaScript API to Work with Embedded Excel.
If you just want to display your spreadsheet on a webpage—not manipulate it programmatically—use an embed code that displays the spreadsheet in an iframe, not JavaScript that displays the spreadsheet in a div element. See complete instructions for embedding a spreadsheet on a web page.
Here’s how to get the JavaScript snippet:
- Right-click your spreadsheet on SkyDrive, and then click Embed.
- Click Generate, and then click Customize this embedded Excel workbook.
- Set the display and interactivity options for the embedded spreadsheet. When the preview displays what you want, click the JavaScript tab on the box that contains the generated code, and then click Copy.
- Paste the code into the HTML of your web app.