Compartilhar via


Passo a passo: como desenvolvendo uma UDF de código gerenciado

This walkthrough describes the process for developing Excel Services user-defined functions (UDFs) using Microsoft Visual C#.

During this walkthrough, you will learn how to:

  • Create a project using the Microsoft Visual Studio 2005 class library project template.

  • Add a reference to Microsoft.Office.Excel.Server.Udf.dll.

  • Write UDFs for use in Excel Services.

  • Create a workbook to call custom functions from cells.

  • Test and run UDFs in Excel Services.

Pré-requisitos

In order to complete this walkthrough, you will need:

  • Microsoft SharePoint Server 2010

    Observação

    [!OBSERVAçãO] The easiest way to get all you need on the server is to do a basic, stand-alone install. All you need to add on top of that is a trusted location.

  • Excel

  • Visual Studio ou uma ferramenta de desenvolvimento compatível com .NET Framework da Microsoft

  • Para habilitar a execução do assembly UDF

  • Uma biblioteca de documentos confiável do SharePoint na qual armazenar uma pasta de trabalho e permitir que a pasta de trabalho chame UDFs definindo o valor AllowUdfs como true

  • Uma pasta de trabalho de exemplo que chama o UDF armazenado em uma biblioteca de documentos confiável do SharePoint

  • Permissões para exibir e publicar uma pasta de trabalho em uma biblioteca de documentos do SharePoint

    Observação

    [!OBSERVAçãO] For more information about setting permissions, see the Windows SharePoint Services 3.0 documentation.

  • Para criar a pasta de trabalho usando o Excel

  • Para salvar a pasta de trabalho como um arquivo .xlsx ou .xlsb

    Observação

    [!OBSERVAçãO] For more information about how to trust a location, how to enable UDFs, and how to set the AllowUdfs flag, see Step 3: Deploying and Enabling UDFs.

Confira também