Sunday, March 17, 2013

Troubleshoot User Defined Functions of SharePoint Excel Services

 
When you have followed the instruction like this one Creating Managed-Code UDFs for Excel Services to create User Defined Functions, you may find that the UDF doesn't work.
 
There are two things to check.
 
1st, if you deploy the UDF assemblies to hard drive, the location of the UDF assemblies cannot be your user folder under c:\Users\username\...
If you deploy the dll under user's folder, the SharePoint service account will not have asscess to it.
 
2nd, if you deploy the UDF assembly to GAC, make sure to use the strong name in configuration. The example given in the Shared Services Admin is not right
 
"Strong name or full path of an assembly that contains user-defined functions, which Excel Calculation Services can call. Examples: SampleCompany.SampleApplication.SampleUdf, C:\UDFs\SampleUdf.dll, \\MyNetworkServer\UDFs\SampleUdf.dll."
 
and MSDN document is wrong too.
 
The strong name format is
 
SampleCompany.SampleApplication.SampleUdf, Version=1.0.0.0, Culture=neutral, PublicKeyToken=18b82a9afe7f447a
Notice the hightlighted part doesn't have .dll.

No comments:

Post a Comment