Export (0) Print
Expand All

Excel Services ECMAScript Overview

SharePoint 2010

Last modified: April 07, 2010

Applies to: SharePoint Server 2010

In Microsoft SharePoint Server 2010, Excel Services added support for ECMAScript (JavaScript, JScript). JavaScript enables a new set of solutions by using Excel Services.

The JavaScript object model in Excel Services enables developers to automate, customize, and interact with the Excel Web Access Web Part control on a page. By using the JavaScript object model, you can build mashups and other integrated solutions that interact with one or more Excel Web Access Web Part controls on a page. It also enables you to add more capabilities to your workbooks and to code around them.

By using the JavaScript object model, it is possible to detect and react to a user's interactions with an Excel Web Access Web Part and to programmatically interact with one or multiple Excel Web Access Web Parts.

To use the JavaScript object model in Excel Services, you insert the JavaScript code on the page that contains the Excel Web Access Web Part. This can be done by adding the code to the Web Part page by using the Content Editor Web Part or by directly editing the .aspx page.

The JavaScript object model in Excel Services enables developers to:

  • Access items in a workbook such as ranges, tables, PivotTables, charts, and sheets.

  • Set and retrieve values from cells by using ranges or named ranges.

  • Raise events when the user changes the active selection or active cell or when the user starts editing a cell.

  • Scroll to a different region and to switch the displayed sheet or named item.

For more information, see the following links:

  • For more information about the JavaScript object model in Excel Services, see the Ewa namespace reference documentation.

  • For an example of how to interact with the JavaScript object model in Excel Services by using the Content Editor Web Part, see Walkthrough: Developing Using the Content Editor Web Part.

Minified .js files for the JavaScript object model are installed in the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS directory. The name of the file is EwaMoss.js.

For basic information about how to use the JavaScript object model within an .aspx page or .js file, see Setting Up an Application Page for JavaScript.

Show:
© 2014 Microsoft