Activer les fonctions définies par l’utilisateurEnable UDFs

Each Excel Services trusted location in the Shared Services Provider (SSP) has an AllowUdfs flag.Each Excel Services trusted location in the Shared Services Provider (SSP) has an AllowUdfs flag.

Note

[!REMARQUE] The AllowUdfs flag is denoted by the User-defined functions allowed option on the Excel Services Trusted File Locations page.The AllowUdfs flag is denoted by the User-defined functions allowed option on the Excel Services Trusted File Locations page.

The default AllowUdfs value is false. If the AllowUdfs value is set to false in a particular trusted location, the workbooks in that trusted location are not allowed to call UDFs.The default AllowUdfs value is false. If the AllowUdfs value is set to false in a particular trusted location, the workbooks in that trusted location are not allowed to call UDFs.

In order to allow UDFs to be called from a specific trusted location, you set the AllowUdfs value to true.If the AllowUdfs value is false when a session is started on a workbook that has UDF calls in this trusted location, the UDF calls will fail. If you change the AllowUdfs value to true after a session has started, the UDF calls will also fail. This is because changes in the AllowUdfs flag take effect on the next session, after the configuration database has been updated.You can get around this by restarting the session—for example, by selecting Reload Workbook in Excel Web Access.In order to allow UDFs to be called from a specific trusted location, you set the AllowUdfs value to true.If the AllowUdfs value is false when a session is started on a workbook that has UDF calls in this trusted location, the UDF calls will fail. If you change the AllowUdfs value to true after a session has started, the UDF calls will also fail. This is because changes in the AllowUdfs flag take effect on the next session, after the configuration database has been updated.You can get around this by restarting the session—for example, by selecting Reload Workbook in Excel Web Access.

Attention : Si vous choisissez de réinitialiser Microsoft Internet Information Services (IIS) à la place, elle se termine toutes les sessions en cours.Caution: If you choose to reset Microsoft Internet Information Services (IIS) instead, it will end all current sessions.

Enabling UDFsEnabling UDFs

To do the following steps, you need a computer that has Microsoft SharePoint Server 2010 installed.To do the following steps, you need a computer that has Microsoft SharePoint Server 2010 installed.

To enable UDFsTo enable UDFs

  1. On the Start menu, click All Programs.On the Start menu, click All Programs.

  2. Point to Microsoft Office Server and click SharePoint Central Administration.Point to Microsoft Office Server and click SharePoint Central Administration.

  3. On the Quick Launch, click your Shared Services Provider (SSP) link—for example, "SharedServices1"—to view the Shared Services home page for that particular SSP.On the Quick Launch, click your Shared Services Provider (SSP) link—for example, "SharedServices1"—to view the Shared Services home page for that particular SSP.

  4. Under Excel Services Settings, click User-defined functions.Under Excel Services Settings, click User-defined functions.

  5. On the Excel Services User-Defined Functions page, click Add User-Defined Function to open the Excel Services Add User-Defined Function Assembly page.On the Excel Services User-Defined Functions page, click Add User-Defined Function to open the Excel Services Add User-Defined Function Assembly page.

  6. In the Assembly box, type the path to the UDF assembly. For example,C:\MyUdfFolder\MyUdf.dll.In the Assembly box, type the path to the UDF assembly. For example,C:\MyUdfFolder\MyUdf.dll.

  7. Under Assembly Location, click Local file.Under Assembly Location, click Local file.

    Note

    [!REMARQUE] The Local file option will be replaced with File path in future releases of Excel Services. If you see File path, select that instead.The Local file option will be replaced with File path in future releases of Excel Services. If you see File path, select that instead.

  8. Under Enable Assembly, the Assembly enabled check box should be selected by default.Under Enable Assembly, the Assembly enabled check box should be selected by default.

  9. Click OK.Click OK.

Allowing UDF CallsAllowing UDF Calls

To allow UDFs to be called from a workbookTo allow UDFs to be called from a workbook

  1. Open the Excel Services Add Trusted File Location page (if you are adding a new trusted location) or Excel Services Edit Trusted File Location page (if you are editing an existing trusted location).Open the Excel Services Add Trusted File Location page (if you are adding a new trusted location) or Excel Services Edit Trusted File Location page (if you are editing an existing trusted location).

    Note

    [!REMARQUE] For more information about trusting a location, see How to: Trust a Location.For more information about trusting a location, see How to: Trust a Location.

  2. Under Allow User-Defined Functions, select User-defined functions allowed to allow UDFs to be called from workbooks stored in this trusted location.Under Allow User-Defined Functions, select User-defined functions allowed to allow UDFs to be called from workbooks stored in this trusted location.

  3. Click OK.Click OK.

Voir aussiSee also