Freigeben über


Excel Services-Entwicklungsroadmap

An important aspect of Excel Services is that solution developers can use its power programmatically from their applications. These applications can be line-of-business (LOB) products or custom enterprise solutions that an organization develops internally.

Following are examples of these applications:

  • Multitiered applications, with the presentation layer implemented as a Web application (for example, an ASP.NET application) that calls Excel Web Services.

  • Applications within Microsoft SharePoint Server 2010, or integrated with LOB products.

There are five types of development that you can do by using Excel Services:

  • Develop solutions by using Excel Web Services

  • Erweitern Sie Microsoft Excel-Funktionsbibliothek in Excel Services mit benutzerdefinierten Funktionen

  • Anpassen des Excel Web Access-Webparts

  • Entwickeln von Lösungen mithilfe von ECMAScript (JavaScript, JScript)

  • Verwenden der REST-API zum Durchführen von Operationen in Excel-Arbeitsmappen

Excel Web Service

Nachfolgend finden Sie die Hauptszenarios für Excel Web Services:

  • Server-side Excel calculation

    This scenario is application-centric. In this scenario, you use models defined in Excel workbooks and calculated on the server as part of application logic.

  • Automating workbook updates on the server

    This scenario is file-centric. In this scenario, Excel Web Services processes a workbook, and saves copies of the workbook or snapshots.

  • Opening workbooks in edit sessions

    Excel Web Services supports opening workbooks in edit sessions in SharePoint Server 2010. In this scenario, you can use code to edit a workbook.

Server-Side Excel Calculation

For server-side Excel calculation, a custom application typically uses an Excel model as part of its logic. Instead of having to re-code Excel workbook business logic in a programming language, the business user can maintain the model in Excel in a server location. The developer never needs to change a line of code in the application that uses the model created by the business user.

In this scenario, the custom application repeatedly calls Excel Web Services, which sends the calls to a back-end calculation service. Dienste für Excel-Berechnungen does the following:

  • Loads the specified Excel workbook

  • Receives inputs

  • Processes the workbook (for example, refreshes data or performs calculations)

  • Senden der Ergebnisse an die benutzerdefinierte Anwendung

Automatisierung von Arbeitsmappenaktualisierungen auf dem Server

Wenn Entwickler das Aktualisieren von Excel-Arbeitsmappen auf dem Server automatisieren, haben sie häufig zwei Ziele:

  • Generate Excel files or modify Excel templates by using the Open XML-Dateiformate, and then calculate the generated Excel file.

  • Periodically open an Excel file to refresh external data (once, or maybe multiple times per user), and then calculate the resulting workbooks and save them or send them in e-mail messages to various users.

In this scenario, a custom application uses Excel Web Services to do the following:

  • Load the specified Excel workbook

  • Input parameters

  • Process the workbook (for example, refresh data or perform calculations)

The custom application retrieves the live version of the workbook or snapshot and then saves the workbook or snapshot by using Excel Web Services.

Hinweis

Wenn Sie Änderungen an einer Arbeitsmappe vornehmen, z. B. durch Festlegen von Werten für einen Bereich mithilfe von Excel Web Services, bleiben die Änderungen an der Arbeitsmappe nur für diese bestimmte Sitzung erhalten. Die Änderungen werden nicht in der ursprünglichen Arbeitsmappe gespeichert oder persistent gemacht. Wenn die aktuelle Arbeitsmappensitzung beendet wird (z. B. wenn Sie die CloseWorkbook-Methode aufrufen oder ein Sitzungstimeout aufgetreten ist), gehen die vorgenommenen Änderungen verloren.> Wenn Sie Änderungen speichern möchten, die Sie an einer Arbeitsmappe vornehmen, können Sie die GetWorkbook-Methode verwenden und die Arbeitsmappe dann mithilfe der SaveWorkbook-Methode oder der SaveWorkbookCopy-Methode speichern. Weitere Informationen zur Excel Web Services-API finden Sie unter Microsoft.Office.Excel.Server.WebServices .

Verwenden von Excel Web Services

Sie können Excel Web Services als Folgendes verwenden:

  • A regular Web service, by calling the Web methods through SOAP over HTTP.

  • A local assembly, by linking directly to Microsoft.Office.Excel.Server.Webservices.dll.

Weitere Informationen dazu, wann Sie direkt eine Verknüpfung mit Microsoft.Office.Excel.Server.Webservices.dllherstellen sollten, finden Sie unter LoopBack-SOAP-Aufrufe und Direct Linking.

Informationen zur Excel Web Services-API finden Sie in der Referenzdokumentation zum Microsoft.Office.Excel.Server.Webservices-Namespace . For an example of how to develop a custom application by using Excel Web Services, see Walkthrough: Developing a Custom Application Using Excel Web Services.

User-Defined Functions (UDFs)

Excel Services supports managed-code UDFs. Excel Services UDFs give you the ability to use formulas in cells to call custom functions written in managed code and deployed to SharePoint Server 2010. You can create UDFs to:

  • Call custom mathematical functions.

  • Get data from custom data sources into worksheets.

  • Call Web services from the UDFs.

  • Wrap calls to existing native code library functions—for example, existing Excel UDFs.

Weitere Informationen zu Excel Services UDFs finden Sie unter Grundlegendes Excel Services UDFs.

Verwenden von UDFs

Informationen zu Excel Services UDF-Definitionen finden Sie in der Referenzdokumentation zum Microsoft.Office.Excel.Server.Udf-Namespace.

Ein Beispiel zum Erstellen von UDFs mit verwaltetem Code finden Sie unter Exemplarische Vorgehensweise: Entwickeln einer Managed-Code UDF.

Excel Web Access

Sie können die erweiterbaren Eigenschaften des Excel Web Access-Webparts für Folgendes verwenden:

  • Programmgesteuertes Konfigurieren von Excel Web Access.

  • Programmgesteuertes Ändern von Excel Web Access-Eigenschaften.

  • Anwenden eines Designs oder einer Marke auf eine Webpartseite mithilfe von Cascading Stylesheets (CSS).

Verwenden der Erweiterbarkeit des Excel Web Access-Webparts.

Thema:

  • Erweiterbare Excel Web Access-Eigenschaften finden Sie in der Referenzdokumentation zum Namespace Microsoft.Office.Excel.Server.WebUI.

  • Excel Web Access-CSS finden Sie in der Referenzdokumentation zu CSS.

  • Informationen zum programmgesteuerten Konfigurierens eines Webparts finden Sie um SharePoint Foundation-SDK.

ECMAScript (JavaScript, JScript)

In SharePoint Server 2010, Excel Services added support for JavaScript. Das JavaScript-Objektmodell in Excel Services ermöglicht Entwicklern das Automatisieren, Anpassen und Interagieren mit dem Excel Web Access-Webpart-Steuerelement auf einer Seite. Mithilfe des JavaScript-Objektmodells können Sie Mashups und andere integrierte Lösungen erstellen, die mit einem oder mehreren Excel Web Access-Webpartsteuerelementen auf einer Seite interagieren. It also enables you to add more capabilities to your workbooks and code around them.

Weitere Informationen zum JavaScript-Objektmodell in Excel Services finden Sie in der Referenzdokumentation zum Ewa-Namespace.

Using ECMAScript (JavaScript, JScript)

Weitere Informationen zu JavaScript finden Sie unter den folgenden Themen:

REST-API

The REST API in Excel Services is new in SharePoint Server 2010. By using the REST API, you can access workbook parts or elements directly through a URL.

The discovery mechanisms built into the Excel Services REST API also enable developers and users to explore the content of a workbook manually or programmatically, by supplying Atom feeds that contain information about the elements that reside in a specific workbook. The resources that you can access through the REST API are ranges, charts, tables, and PivotTables.

Using the Atom feed provided by the REST API enables an easier way to get to the data that you care about. Der Feed enthält durchsuchbare Elemente, mit denen jeder Codeabschnitt ermitteln kann, welche Elemente in einer Arbeitsmappe vorhanden sind.

Weitere Informationen finden Sie unter Excel Services-REST-API.

Verwenden der REST-API

Thema:

Siehe auch

Aufgaben

Gewusst wie: Programmgesteuertes Hinzufügen eines Excel Web Access-Webparts zu einer Seite

Konzepte

Excel Services (Übersicht)

Excel Services-Architektur

Unterstützte und nicht unterstützte Features

Excel Services - Blogs, Foren und Ressourcen

Sonstige Ressourcen

Schritt für Schritt: Entwickeln einer benutzerdefinierten Anwendung mit Excel Web Services