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

This walkthrough describes the process for developing Serviços do Excel 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 Serviços do Excel.

  • Create a workbook to call custom functions from cells.

  • Test and run UDFs in Serviços do Excel.

Pré-requisitos

In order to complete this walkthrough, you will need:

  • Microsoft Servidor do SharePoint 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 o Microsoft .NET Framework semelhante

  • Para ativar a execução da assemblagem UDF

  • Uma biblioteca de documentos fidedigna do SharePoint na qual armazenar um livro e permitir que o livro chame UDFs ao definir o valor AllowUdfs como verdadeiro

  • Um livro de exemplo que chama a UDF armazenada numa biblioteca de documentos fidedigna do SharePoint

  • Permissões para ver e publicar um livro numa 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 o livro com o Excel

  • Para guardar o livro como um ficheiro .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