id stringlengths 14 16 | text stringlengths 2 3.14k | source stringlengths 45 175 |
|---|---|---|
e128d0d06102-0 | You can link to entities directly by using the REST API in Excel Services.
Note
The Excel Services REST API applies to SharePoint and SharePoint 2016 on-premises. For Office 365 Education, Business, and Enterprise accounts, use the Excel REST APIs that are part of the Microsoft Graph endpoint.
Base REST UR... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/resources-uri-for-excel-services-rest-api |
e128d0d06102-1 | /model
workbook
/model?$format=workbook
This is the workbook. Supported workbook formats are xlsx, xlsb, and xlsm.
/model/Ranges
Atom (default)
/model/Ranges?$format=atom
An Atom feed that listis all the named ranges in the workbook.
/model/Ranges('[Name]')
HTML (default)
... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/resources-uri-for-excel-services-rest-api |
e128d0d06102-2 | Atom
/model/Tables('MyTable')?$format=atom
An Atom entry that contains an XML representation of the data within the table.
/model/PivotTables
Atom (default)
/model/PivotTables?$format=atom
An Atom feed that lists all the available PivotTables in the workbook
/model/PivotTables('[Name... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/resources-uri-for-excel-services-rest-api |
de5c50de1739-0 | This topic discusses the discovery mechanisms built into the Excel Services REST API.
Note
The Excel Services REST API applies to SharePoint and SharePoint 2016 on-premises. For Office 365 Education, Business, and Enterprise accounts, use the Excel REST APIs that are part of the Microsoft Graph endpoint.
Di... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/discovery-in-excel-services-rest-api |
de5c50de1739-1 | Excel Services REST model URL
The URL to the model page is where you start the discovery. The model page displays four resource collections that the Excel Services REST API currently supports. The resource collections are ranges, charts, tables, or PivotTables. You can explore those resources in a particular workbo... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/discovery-in-excel-services-rest-api |
de5c50de1739-2 | Atom Feed
Using the Atom feed provided by the REST API gives you an easier way of getting to the data that you are interested in. If you view the source of the webpage, you get the XML. An example from the charts in sampleWorkbook.xlsx is shown below.
As can be seen in the XML, the feed contains traversable ele... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/discovery-in-excel-services-rest-api |
de5c50de1739-3 | <title>Chart 1</title>
<id>http://ServerName/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model/Charts('Chart%201')</id>
<updated>2010-01-19T19:32:53Z</updated>
<author>
<name />
</author>
<link rel="alternate" title="Chart 1" href="http://ServerName/_vti_bin/ExcelRest.aspx/Docs/... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/discovery-in-excel-services-rest-api |
de5c50de1739-4 | </entry>
<entry>
<category term="ExcelServices.Chart" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<title>SampleChart </title>
<id>http://ServerName/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model/Charts('SampleChart%20')</id>
<updated>2010-01-19T19:32:53Z<... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/discovery-in-excel-services-rest-api |
d2244c1e7c41-0 | This topic explains how to construct the URI structure and path for REST service commands in Excel Services.
Note
The Excel Services REST API applies to SharePoint and SharePoint 2016 on-premises. For Office 365 Education, Business, and Enterprise accounts, use the Excel REST APIs that are part of the Microsoft... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/basic-uri-structure-and-path |
d2244c1e7c41-1 | Workbook Location : /Docs/Documents/sampleWorkbook.xlsx
Resource Location : /model/Ranges('nameOfTheNamedRange')
Accessing by Using the Discovery User Interface
You can also access the chart by using the discovery user interface. To learn how access resources like charts, tables, PivotTables, and ranges by us... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/basic-uri-structure-and-path |
d2244c1e7c41-2 | http://<ServerName>/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx/model/Charts('Chart 1')
See also
Concepts
Resources URI for Excel Services REST API
Discovery in Excel Services REST API | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/basic-uri-structure-and-path |
07451f8ad13a-0 | The REST API in Excel Services is new in Microsoft SharePoint Server 2010. By using the REST API, you can access workbook parts or elements directly through a URL.
Note
The Excel Services REST API for SharePoint Online will no longer be supported for Microsoft 365 accounts from February 28th, 2022 forward. Instea... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/excel-services-rest-api-overview |
2ab1e08f54cb-0 | This article walks you through a powerful Web-based mashup that combines an embedded Excel workbook and Bing Maps.
About the "Destination Explorer"
The Destination Explorer is a mashup that lets the user choose a region, a destination type (city or park), a specific destination within the region, and then see weath... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-create-a-mashup-that-uses-an-embedded-workbook-and-bing-maps |
2ab1e08f54cb-1 | Store the workbook on OneDrive. Find more information on the OneDrive page.
Embed the workbook on the page. Find more information on embedding workbooks from OneDrive here .
Mash it up with Bing Maps. This step is covered in more detail in the following sections.
Mashup Excel Services and Bing Maps
After... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-create-a-mashup-that-uses-an-embedded-workbook-and-bing-maps |
2ab1e08f54cb-2 | <!-- HTML omitted for brevity -->
<div id="mapDiv" style="position:relative; width:693px; height:400px;"></div>
<!-- HTML omitted for brevity -->
Initialize the embedded workbook charts and the Bing Map
The next step is to initialize the Excel components and the Bing Map when the page loads. In order to ... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-create-a-mashup-that-uses-an-embedded-workbook-and-bing-maps |
2ab1e08f54cb-3 | // Set the page event handlers for onload and unload.
if (window.attachEvent) {
window.attachEvent("onload", Page_Load);
} else {
// For some browsers window.attachEvent does not exist.
window.addEventListener("DOMContentLoaded", Page_Load, false);
}
hideCharts();
// Page load event handler
function Page_Load()... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-create-a-mashup-that-uses-an-embedded-workbook-and-bing-maps |
2ab1e08f54cb-4 | map = new Microsoft.Maps.Map(document.getElementById("mapDiv"),{
credentials: "YOUR CREDENTIALS",
center: new Microsoft.Maps.Location(37.2802459560, -112.738963),
mapTypeId: Microsoft.Maps.MapTypeId.road,
zoom: 3
});
Create the appropriate callback functions
All calls to functions in the Excel Services J... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-create-a-mashup-that-uses-an-embedded-workbook-and-bing-maps |
2ab1e08f54cb-5 | updateMap() - Updates the map if necessary
updateChart() - Updates the chart if necessary
The purpose of the chain of callbacks shown in Snippet 3 is to update the data shown on the HTML page. There is another chain of callback functions used to modify data within the Travel workbook. For example, if you chan... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-create-a-mashup-that-uses-an-embedded-workbook-and-bing-maps |
2ab1e08f54cb-6 | // Event handler called when user selects a different destination.
function onDestinationChange() {
var select = document.getElementById('destinations');
var i = select.selectedIndex;
currentDestination = select.options[i].text;
updateChart();
updateMap(false);
}
// Event handler called when user selects a d... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-create-a-mashup-that-uses-an-embedded-workbook-and-bing-maps |
1b562b3a449d-0 | When you write code that uses the JavaScript object model (JSOM), there are two scenarios where the code can run: on a SharePoint page; or on a host webpage that contains an embedded workbook that is stored on Microsoft OneDrive. This article discusses the main difference between the two scenarios that significantly af... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/working-with-the-excel-services-javascript-object-model |
1b562b3a449d-1 | // Add event handler for onload event.
if (window.attachEvent)
{
window.attachEvent("onload", ewaOmPageLoad);
}
else
{
window.addEventListener("DOMContentLoaded", ewaOmPageLoad, false);
}
// Add event handler for applicationReady event.
function ewaOnPageLoad()
{
if (typeof (Ewa) != "undefined")
... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/working-with-the-excel-services-javascript-object-model |
1b562b3a449d-2 | // Add other initialization logic here.
}
// Add your code here.
</script>
Getting a reference to the EwaControl object (OneDrive)
When writing code that interacts with an embedded workbook that is stored on OneDrive, you get a reference to the [Ewa.EwaControl] object through the AsyncResult object. The ... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/working-with-the-excel-services-javascript-object-model |
1b562b3a449d-3 | // Run the Excel load handler on page load.
if (window.attachEvent)
{
window.attachEvent("onload", loadEwaOnPageLoad);
} else
{
window.addEventListener("DOMContentLoaded", loadEwaOnPageLoad, false);
}
function loadEwaOnPageLoad()
{
var props = {
uiOptions... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/working-with-the-excel-services-javascript-object-model |
1b562b3a449d-4 | function onEwaLoaded(asyncResult)
{
if (asyncResult.getSucceeded())
{
// Use the AsyncResult.getEwaControl() method to get a reference to the EwaControl object
ewa = asyncResult.getEwaControl();
…
}
else
{
alert("Async operatio... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/working-with-the-excel-services-javascript-object-model |
c1c7b47a725d-0 | JavaScript user-defined functions (UDFs) are new in Excel Services in SharePoint. This article provides a high-level look at JavaScript UDFs, including basic information on how they work in Excel Services.
Note
If you’re looking information on JavaScript custom functions for Office Add-ins, see: Create custom fu... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/javascript-user-defined-functions-overview |
c1c7b47a725d-1 | When the webpage with the Excel Web Access web part or embedded workbook renders, you can invoke the JavaScript UDF in the workbook just like any other Excel workbook.
For example, you may have a function that gets the current stock price for a specific stock. You could add a JavaScript UDF to the webpage that hosts ... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/javascript-user-defined-functions-overview |
c1c7b47a725d-2 | You could then call the JavaScript UDF, StockInfo, in a formula from a cell inside the Excel Online.
Figure 1. JavaScript UDF invoked in Excel Online
Where can I use JavaScript UDFs?
You can create and use JavaScript UDFs either on workbooks displayed in SharePoint Excel Web Access web parts or on a host we... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/javascript-user-defined-functions-overview |
dd861ae9cbfc-0 | In Microsoft SharePoint Server 2010, Excel Services added support for ECMAScript (JavaScript, JScript). JavaScript enables a new set of solutions by using Excel Services.
The JavaScript object model in Excel Services enables developers to automate, customize, and interact with the Excel Web Access web part control on... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/excel-services-ecmascript-overview |
dd861ae9cbfc-1 | For an example of how to interact with the JavaScript object model in Excel Services by using the Content Editor web part, see Walkthrough: Developing Using the Content Editor web part .
ECMAScript .js File Location
Minified .js files for the JavaScript object model are installed in the %ProgramFiles%\Common ... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/excel-services-ecmascript-overview |
d657963ed8c6-0 | After you create an ECMAScript (JavaScript, JScript) text file and save the text file in a trusted location, the next step is to create a web parts Page and add the Content Editor web part and the Excel Services web part to the page.
Next, display a workbook by using the Excel Services web part that you added to the ... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/step-2-adding-the-content-editor-and-excel-services-web-parts |
3d9acc3a834b-0 | For this walkthrough, you will create an ECMAScript (JavaScript, JScript) text file. This walkthrough assumes that you are familiar with coding in JavaScript.
To create an ECMAScript text file
Create a text file and name it JSOM_FeedToContentEditor.txt.
Add the following script to the JSOM_FeedToContentEditor... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/step-1-creating-a-ecmascript-text-file |
3d9acc3a834b-1 | function selChanged(rangeArgs)
{
writelog('Address:'+ rangeArgs.getRange().getAddressA1(),1);
writelog('Value:' + rangeArgs.getFormattedValues(),1);
writelog('Selection changed event triggered',0);
}
function gridSynchronized(res)
{
writelog('WorkbookPath:' +om.getActiveWorkbook().getWorkbookPath(),1);... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/step-1-creating-a-ecmascript-text-file |
47b9ef5cf20c-0 | If you want to programmatically add an Excel Web Access web part to a SharePoint page and programmatically change the Excel Web Access web part, you must add a reference to the required SharePoint DLLs. For example:
Microsoft.Office.Excel.WebUI.dll
Microsoft.Office.Excel.WebUI.Internal.dll
Microsoft.SharePoint.... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-locate-and-copy-microsoft-office-excel-webui-dll-and-microsoft-office-exc |
47b9ef5cf20c-1 | cd C:\Windows\assembly
Use the dir command to display the contents of the C:\Windows\assembly directory:
C:\Windows\assembly>dir
You will see contents similar to the following:
Volume in drive C has no label. | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-locate-and-copy-microsoft-office-excel-webui-dll-and-microsoft-office-exc |
47b9ef5cf20c-2 | Directory of C:\\Windows\\assembly | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-locate-and-copy-microsoft-office-excel-webui-dll-and-microsoft-office-exc |
47b9ef5cf20c-3 | 02/20/2010 09:22 AM <DIR> GAC
02/20/2010 09:39 AM <DIR> GAC_32
02/20/2010 09:32 AM <DIR> GAC_64
02/22/2010 05:05 PM <DIR> GAC_MSIL
02/22/2010 05:35 PM <DIR> NativeImages_v2.0.50727_32
02/22/2010 04:33 PM <DIR> NativeImages_v2.0.50727_64
02/20... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-locate-and-copy-microsoft-office-excel-webui-dll-and-microsoft-office-exc |
47b9ef5cf20c-4 | Directory of C:\\Windows\\assembly\\GAC_MSIL
...
02/20/2010 07:57 AM <DIR> Microsoft.Office.Excel.Server.Udf
02/20/2010 07:57 AM <DIR> Microsoft.Office.Excel.Server.WebServices | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-locate-and-copy-microsoft-office-excel-webui-dll-and-microsoft-office-exc |
47b9ef5cf20c-5 | 02/20/2010 07:57 AM <DIR> Microsoft.Office.Excel.WebUI
02/20/2010 07:57 AM <DIR> Microsoft.Office.Excel.WebUI.Internal
...
02/20/2010 07:57 AM <DIR> Microsoft.SharePoint
...
0 File(s) 0 bytes
739 Dir(s) 100,594,409,472 bytes free
Now that you have l... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-locate-and-copy-microsoft-office-excel-webui-dll-and-microsoft-office-exc |
47b9ef5cf20c-6 | 02/20/2010 07:57 AM <DIR> .
02/20/2010 07:57 AM <DIR> ..
02/20/2010 07:57 AM <DIR> 14.0.0.0__71e9bce111e9429c
0 File(s) 0 bytes
3 Dir(s) 104,006,115,328 bytes free
Use the cd command again to change the directory:
C:\Windows\ass... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-locate-and-copy-microsoft-office-excel-webui-dll-and-microsoft-office-exc |
47b9ef5cf20c-7 | 02/20/2010 09:22 AM <DIR> GAC
02/20/2010 09:39 AM <DIR> GAC_32
02/20/2010 09:32 AM <DIR> GAC_64
02/22/2010 05:05 PM <DIR> GAC_MSIL
02/22/2010 05:35 PM <DIR> NativeImages_v2.0.50727_32
02/22/2010 04:33 PM <DIR> NativeImages_v2.0.50727_64
02/20... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-locate-and-copy-microsoft-office-excel-webui-dll-and-microsoft-office-exc |
47b9ef5cf20c-8 | 02/20/2010 07:57 AM <DIR> Microsoft.Office.Excel.WebUI
02/20/2010 07:57 AM <DIR> Microsoft.Office.Excel.WebUI.Internal
...
C:\Windows\assembly\GAC_MSIL>cd Microsoft.Office.Excel.WebUI
C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Excel.WebUI>dir
Volume in drive C has no label.
Directory of... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-locate-and-copy-microsoft-office-excel-webui-dll-and-microsoft-office-exc |
92f7c1ce2390-0 | This example shows how to programmatically add an Excel Web Access web part to a SharePoint page. It also shows you how to display an Excel workbook programmatically in an Excel Web Access web part.
The following project uses Microsoft Visual Studio.
Note
Depending on the Visual Studio version and the Visual St... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-programmatically-add-an-excel-web-access-web-part-to-a-page |
92f7c1ce2390-1 | Select Microsoft.Office.Excel.WebUI.dll, and then click OK .
Click Add Reference . A reference to Microsoft.Office.Excel.WebUI.dll is added to your project.
Instantiating a web part
To instantiate the Excel Web Access web part
Add the Microsoft.Office.Excel.WebUI namespace as a directive to your cod... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-programmatically-add-an-excel-web-access-web-part-to-a-page |
92f7c1ce2390-2 | ...
End Function
Private Sub AddEWAButton_Click(ByVal sender As Object, ByVal e As EventArgs)
siteurl = textBox1.Text
bookuri = textBox2.Text
succeeded = AddWebPart(siteurl, bookuri)
If succeeded Then
MessageBox.Show(success, appname, MessageBoxButtons.OK, MessageBoxIcon.Info... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-programmatically-add-an-excel-web-access-web-part-to-a-page |
92f7c1ce2390-3 | try
{
webPartManager.AddWebPart(ewaWebPart, "Left", 0);
}
catch (Exception exc)
{
MessageBox.Show(
addWebPartError + "\\n" + exc.Message,
appName,
MessageBoxButtons.OK,
MessageBoxIcon.Asterisk);
progressBar1.Value = 1;
return b;
'Instantiate Excel Web Access web part.
... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-programmatically-add-an-excel-web-access-web-part-to-a-page |
92f7c1ce2390-4 | /// <summary>
/// Form1 class derived from System.Windows.Forms.
/// </summary>
public partial class Form1 : Form
{
private string appName = "AddEWATool";
private string specifyInputError = "Please add a site URL, for example: http://myserver/site/";
private string openSiteError ... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-programmatically-add-an-excel-web-access-web-part-to-a-page |
92f7c1ce2390-5 | try
{
try
{
site = new SPSite(siteName);
targetWeb = site.OpenWeb();
}
catch (Exception exc)
{
MessageBox.Show(
openSiteError + "\\n" + exc.Mess... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-programmatically-add-an-excel-web-access-web-part-to-a-page |
92f7c1ce2390-6 | progressBar1.PerformStep();
b = true;
return b;
}
/// <summary>
/// AddEWAButton click handler.
/// </summary>
/// <param name="sender">caller</param>
/// <param name="e">event</param>
private void AddEWAButton_Click(object sender, EventAr... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-programmatically-add-an-excel-web-access-web-part-to-a-page |
92f7c1ce2390-7 | ''' <summary>
''' Add the Excel Web Access web part to the Default.aspx page of the specified site.
''' </summary>
''' <param name="siteName">URL of the SharePoint site</param>
''' <param name="book">URI to the workbook</param>
''' <returns>Returns true if the WebPart was success... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-programmatically-add-an-excel-web-access-web-part-to-a-page |
92f7c1ce2390-8 | progressBar1.PerformStep()
'Instantiate Excel Web Access web part.
'Add an Excel Web Access web part in a shared view.
Dim ewaWebPart As New ExcelWebRenderer()
ewaWebPart.WorkbookUri = book
progressBar1.PerformStep()
Try
... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-programmatically-add-an-excel-web-access-web-part-to-a-page |
92f7c1ce2390-9 | progressBar1.PerformStep()
b = True
Return b
End Function
''' <summary>
''' AddEWAButton click handler.
''' </summary>
''' <param name="sender">caller</param>
''' <param name="e">event</param>
Private Sub AddEWAButton_Click(ByVal sender As... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-programmatically-add-an-excel-web-access-web-part-to-a-page |
a55a940fe040-0 | If you do not want a particular user-defined function (UDF) assembly to run with full trust, you must explicitly restrict code access security permissions for it. You can configure code groups and restrict permissions by using the .NET Framework 2.0 Configuration tool.
For example, imagine a scenario where you have a... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-restrict-udf-code-access-security-permissions |
a55a940fe040-1 | Configure the custom code group properties so that your policy level has only the permissions from the permission set that is associated with the custom code group. When Excel Calculation Services loads a UDF assembly that resides on the same computer, the assembly is loaded in the MyComputer zone. This means that by d... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-restrict-udf-code-access-security-permissions |
a55a940fe040-2 | Expand the All_Code node.
Expand the My_Computer_Zone node.Right-click My_Computer_Zone and then select New to display the Identify the new Code Group dialog box.
Select Create a new code group .
In the Name field, type a name for the new code group, for example,RestrictWebAccessUdf.
Click ... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-restrict-udf-code-access-security-permissions |
a55a940fe040-3 | To make sure that the permission sets are executed
Under the My_Computer_Zone node, right-click the new custom code group (in this example, RestrictWebAccessUdf ), and then select Properties .
On the General tab, select the This policy level will only have the permissions from the permission set associat... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-restrict-udf-code-access-security-permissions |
3fca4056ab9e-0 | This example shows how to deploy a user-defined function (UDF) DLL by using the Microsoft SharePoint Foundation solution framework.
The SharePoint Foundation solution framework lets you bundle all the components to extend SharePoint Foundation in a new file called a solution file (a CAB-based format with a .wsp exten... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-deploy-udfs-using-sharepoint-foundation-solutions |
3fca4056ab9e-1 | Deploy the solution by using stsadm.exe.
Each Excel Services trusted location has an AllowUdfs flag.
Note
The AllowUdfs flag is denoted by the User-defined functions allowed option on the Excel Services Trusted File Locations page. To learn how to navigate to the Trusted File Locations page, see Step... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-deploy-udfs-using-sharepoint-foundation-solutions |
3fca4056ab9e-2 | <Assemblies>
<Assembly DeploymentTarget="GlobalAssemblyCache" Location="EcsUdfsCommonSet.dll"/>
</Assemblies>
</Solution>
Note
You should generate a unique GUID for each solution. For more information about Solution element, see the SharePoint Foundation Solutions and web part Packages ( https://msdn.m... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-deploy-udfs-using-sharepoint-foundation-solutions |
3fca4056ab9e-3 | To deploy the solution
Click Start , click Run , and then typecmd.
The command prompt console appears.
Run the following script to deploy the solution to SharePoint server.
stsadm.exe -o deploysolution -name <filename of the CAB> -immediate -allowGacDeployment
You should now see your UDF DLL in the glo... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-deploy-udfs-using-sharepoint-foundation-solutions |
df1b403cedec-0 | This example shows how to access an external database from a user-defined function (UDF).
Example
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Office.Excel.Server.Udf;
using System.Data.SqlClient;
using System.Web;
using System.Security.Principal;
namespace DatabaseAccessUdfT... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-access-an-external-data-source-from-a-udf |
df1b403cedec-1 | [UdfMethod(ReturnsPersonalInformation=true)]
public string GetUserAuthenticationType()
{
return
(System.Threading.Thread.CurrentPrincipal.Identity.AuthenticationType);
}
}
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.Office.Excel.... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-access-an-external-data-source-from-a-udf |
df1b403cedec-2 | <UdfMethod(ReturnsPersonalInformation:=True)> _
Public Function GetUserAuthenticationType() As String
Return (System.Threading.Thread.CurrentPrincipal.Identity.AuthenticationType)
End Function
End Class
End Namespace
See also
Tasks
How to: Create a UDF That Calls a Web Service
H... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-access-an-external-data-source-from-a-udf |
8d13747c199a-0 | This example shows how to call an external Web service from a user-defined function (UDF). The Web service used in this example is:
http://webservices.imacination.com/distance/Distance.jws?wsdl
You must use Microsoft Visual Studio 2005 or a similar Microsoft .NET Framework 2.0-compatible development tool to create t... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-create-a-udf-that-calls-a-web-service |
8d13747c199a-1 | return deg.ToString() + "°" + minutes.ToString() + "\\'" +
seconds.ToString() + "\\"";
}
<UdfMethod> _
Public Function ToDegreeNotation(ByVal angle As Double) As String
Dim deg As Integer = CInt(Fix(angle))
Dim minutesAndSeconds As Double = Math.Abs(angle - deg) * 60
Dim minutes As Integer = CIn... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-create-a-udf-that-calls-a-web-service |
8d13747c199a-2 | Public Sub New()
Me.distanceService = New DistanceService()
'this.distanceService.Proxy = new WebProxy("http://myproxy:80", true);
End Sub
For more information about how to test and call UDFs from cells, see Walkthrough: Developing a Managed-Code UDF .
using System;
using System.... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-create-a-udf-that-calls-a-web-service |
8d13747c199a-3 | return (distanceService.getLatitude(zipString));
}
[UdfMethod]
public double GetLongitudeFromZip(int zip)
{
string zipString = Convert.ToString(zip);
return (distanceService.getLongitude(zipString));
}
[UdfMethod]
public string ToDegreeN... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-create-a-udf-that-calls-a-web-service |
8d13747c199a-4 | Return (distanceService.getCity(zipString))
End Function
<UdfMethod> _
Public Function GetStateFromZip(ByVal zip As Integer) As String
Dim zipString As String = Convert.ToString(zip)
Return (distanceService.getState(zipString))
End Function
<UdfMethod> ... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-create-a-udf-that-calls-a-web-service |
8d13747c199a-5 | Return deg.ToString() & "°" & minutes.ToString() & "'" & seconds.ToString() & """"
End Function
End Class
End Namespace
See also
Tasks
Step 1: Creating a Project and Adding a UDF Reference
Step 2: Creating a Managed-Code UDF
Step 3: Deploying and Enabling UDFs
Step 4: Testin... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-create-a-udf-that-calls-a-web-service |
2d3193033698-0 | Each Excel Services trusted location in the Shared Services Provider (SSP) has an AllowUdfs flag.
Note
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 t... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-enable-udfs |
2d3193033698-1 | Under Excel Services Settings , click User-defined functions .
On the Excel Services User-Defined Functions page, click Add User-Defined Function to open the Excel Services Add User-Defined Function Assembly page.
In the Assembly box, type the path to the UDF assembly. For example,C:\MyUdfFolder\MyUdf.dll... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-enable-udfs |
2d3193033698-2 | Understanding Excel Services UDFs
Excel Services Alerts
Excel Services Known Issues and Tips
Excel Services Best Practices | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-enable-udfs |
e8ce44c5d89f-0 | In this step, you will test the SampleUdf.dll assembly you created, deployed, and enabled in the previous steps. To test the user-defined function (UDF), you will:
Create a workbook with a named range and formulas that call the functions in SampleUdf.dll.
Save the workbook to a SharePoint document library that ... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/step-4-testing-and-calling-udfs-from-cells |
e8ce44c5d89f-1 | In cell B1, type the number 8.
Make cell B1 a named range. First click the Formulas tab. Then click cell B1 to select it. On the Formulas tab, in the Named Cells group, click Name a Range . In the New Name dialog box, in the Name box, type MyDoubleParam .
In cell A2, type the formula to call the R... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/step-4-testing-and-calling-udfs-from-cells |
e8ce44c5d89f-2 | Click OK .
In the Save As dialog box, make sure that the Open this workbook in my browser after I save check box is selected.
In the File name box, type the path to the trusted SharePoint document library where you want to store this workbook. For example, http://MyServer002/Shared%20Documents/TestSampl... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/step-4-testing-and-calling-udfs-from-cells |
e8ce44c5d89f-3 | How to: Create a UDF That Calls a Web Service
Concepts
Walkthrough: Developing a Managed-Code UDF
Understanding Excel Services UDFs | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/step-4-testing-and-calling-udfs-from-cells |
57ca07562169-0 | In this step, you will:
Deploy SampleUdf.dll, which you created in Step 2: Creating a Managed-Code UDF , to a folder on a computer that has Microsoft SharePoint Server 2010 installed.
Allow user-defined functions (UDFs) to be called from a specific trusted location, for example, trusted Shared Documents locat... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/step-3-deploying-and-enabling-udfs |
57ca07562169-1 | Under Allow User-Defined Functions , select User-defined functions allowed to allow UDFs to be called from workbooks stored in this trusted location.
Click OK .
Enabling UDFs
To do the following steps, you need a computer that has SharePoint Server 2010 installed.
To enable UDFs
Follow steps 1 thr... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/step-3-deploying-and-enabling-udfs |
57ca07562169-2 | 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. You can get around this by resetting Microsoft Internet Information Services (IIS). Resetting IIS will reload UDFs.
For more informa... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/step-3-deploying-and-enabling-udfs |
f95f637af06b-0 | After you have added a reference to Microsoft.Office.Excel.Server.Udf.dll to your project, the next step is to create some custom functions and mark them with the Excel Services user-defined function (UDF) attributes.
You must mark your UDF class with the Microsoft.Office.Excel.Server.Udf.UdfClass attribute, and ma... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/step-2-creating-a-managed-code-udf |
f95f637af06b-1 | [UdfClass]
<UdfClass>_
Create a function that takes a number (of type double ), and in the function, multiply the number by 9. The function is a UDF method that is nonvolatile. Add the following code to Class1 :
[UdfMethod]
public double MyDouble(double d)
{
return d * 9;
}
<UdfMethod> _
Public Func... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/step-2-creating-a-managed-code-udf |
f95f637af06b-2 | using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Office.Excel.Server.Udf; | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/step-2-creating-a-managed-code-udf |
f95f637af06b-3 | namespace SampleUdf
{
[UdfClass]
public class Class1
{
[UdfMethod]
public double MyDouble(double d)
{
return d * 9;
}
[UdfMethod(IsVolatile = true)]
public DateTime ReturnDateTimeToday()
{
return (DateTime.Today);
}
... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/step-2-creating-a-managed-code-udf |
6d5eb9ff410b-0 | In this step, you will create a project and add a reference to Microsoft.Office.Excel.Server.Udf.dll.
Creating the Project
The following project uses Microsoft Visual Studio 2005.
Note
Depending on which settings you use in the Visual Studio integrated development environment (IDE), the process to create a pr... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/step-1-creating-a-project-and-adding-a-udf-reference |
6d5eb9ff410b-1 | Namespace SampleUdf
Public Class Class1
End Class
End Namespace
Adding a Reference
The following steps show how to locate Microsoft.Office.Excel.Server.Udf.dll and how to add a reference to it.
To add a reference
On the Project menu, click Add Reference .
In the Add Reference dialog box, on the .NE... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/step-1-creating-a-project-and-adding-a-udf-reference |
0a266c9445a2-0 | User-defined functions (UDFs) are custom functions that extend the calculation and data-import capabilities of Excel. Developers create custom calculation packages to provide:
Functions that are not built into Excel.
Custom implementations to built-in functions.
Custom data feeds for legacy or unsupported d... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/understanding-excel-services-udfs |
0a266c9445a2-1 | Required Attributes
To use custom functions in a class as an Excel Services UDF class, you must mark your UDF class with the Microsoft.Office.Excel.Server.Udf.UdfClass attribute. Any classes that are not marked with this attribute in the UDF assembly will be ignored by Excel Calculation Services. They are not consi... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/understanding-excel-services-udfs |
0a266c9445a2-2 | C:\UDFs\MySampleUdf.dll
\\MyNetworkServer\UDFs\MySampleUdf.dll
CompanyName.Hierarchichal.MyUdfNamespace.MyUdfClassName.dll, Version=1.1.0.0, Culture=en, PublicKeyToken=e8123117d7ba9ae38
Enabling UDF Assemblies
UDF assemblies are disabled by default.
Each Excel Services trusted location has an AllowUd... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/understanding-excel-services-udfs |
0a266c9445a2-3 | Allowing UDF Assemblies to Run
If administrators want to allow UDF assemblies to run, they have to register all UDF assemblies, and enable workbooks to call UDFs by setting the AllowUdfs flag to true in the trusted locations.
Reloading a UDF Assembly
To reload a UDF assembly, you can run iisreset or restart... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/understanding-excel-services-udfs |
0a266c9445a2-4 | Code Access Security in Practice ( https://msdn.microsoft.com/library/default.asp?url=/library/dnnetsec/html/thcmch08.asp )
See also
Tasks
How to: Create a UDF That Calls a Web Service
How to: Trust a Location
How to: Catch Exceptions
How to: Enable UDFs
Concepts
Walkthrough: Developing a Managed-C... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/understanding-excel-services-udfs |
81a326a709db-0 | Excel Services generates errors in the SOAP exception based on errors that occur in Excel Services. To make it easier for the developer to catch specific error conditions, an Excel Calculation Services alert has an associated error code. The Excel Web Services then returns the error using properties from the SoapExcep... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-use-the-subcode-property-to-capture-error-codes |
81a326a709db-1 | ' Set the SOAP protocol version.
xlservice.SoapVersion = SoapProtocolVersion.Soap12
To catch the error codes using the SubCode property, add a SOAP exception catch block to your code, for example:
catch (SoapException e)
{
Console.WriteLine("SOAP Exception Message: {0}", e.Message);
Console... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-use-the-subcode-property-to-capture-error-codes |
81a326a709db-2 | e.SubCode.Code.Name);
}
Catch e As SoapException
Console.WriteLine("SOAP Exception Message: {0}", e.Message)
Console.WriteLine("SOAP Exception Error Code: {0}", e.SubCode.Code.Name)
End Try
Example
The following program (a console application) uses the SubCode property to capture the error codes.... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-use-the-subcode-property-to-capture-error-codes |
81a326a709db-3 | namespace SubCodeExample
{
class Program
{
static void Main(string[] args)
{
if (args.Length != 3)
{
Console.WriteLine("This program requires 3 parameters -
workbook, sheet and cell");
}
string workbookUrl = arg... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-use-the-subcode-property-to-capture-error-codes |
81a326a709db-4 | int retries = 3;
while (retries > 0)
{
try
{
service.Refresh(sessionId, "");
}
catch (SoapException soapException)
{
bool rethrow = true;
... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-use-the-subcode-property-to-capture-error-codes |
81a326a709db-5 | Namespace SubCodeExample
Friend Class Program
Shared Sub Main(ByVal args() As String)
If args.Length <> 3 Then
Console.WriteLine("This program requires 3 parameters - workbook, sheet and cell")
End If
Dim workbookUrl As String = args(0)
Dim she... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-use-the-subcode-property-to-capture-error-codes |
81a326a709db-6 | Catch exception As SoapException
Dim subCode As String = exception.SubCode.Code.Name
If subCode = FileOpenNotFound Then
Console.WriteLine("The workbook could not be found. Change the first argument to be a valid file name.")
ElseIf subCode = DataRefres... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-use-the-subcode-property-to-capture-error-codes |
0437fb466cd2-0 | This example shows how to retrieve updated data from external data sources for the open workbook by using the Refresh method. The Excel Web Services signature for the Refresh method is as follows:
public Status[] Refresh (string sessionId, string connectionName)
Public Function Refresh(ByVal sessionId As Stri... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-refresh-data |
0437fb466cd2-1 | // Set the path to the workbook to open.
// TODO: Change the path to the workbook
// to point to a workbook you have access to.
// The workbook must be in a trusted location.
string targetWorkbookPath =
http://myserver02/example/Shared%20Documents/Book1.xlsx";
// Set credentials for requests.
xlservic... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-refresh-data |
0437fb466cd2-2 | ' Prepare object to define range coordinates.
rangeCoordinates.Column = 0
rangeCoordinates.Row = 0
rangeCoordinates.Height = 8
rangeCoordinates.Width = 10
' Set the cell located in the first row and
' ninth column to 300.
xlservice.SetCell(sessionId, sheetName, 0, 8, 300)
xlservice.Refresh(sessionId, "MyInventoryConn... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-refresh-data |
0437fb466cd2-3 | ' Instantiate the ExcelService class.
Dim xlservice As New ExcelService()
Dim outStatus() As Status
Dim rangeCoordinates As New RangeCoordinates()
Dim sheetName As String = "Sheet3"
' Set the path to the workbook to open.
' TODO: Change the path to the workbook
' to point to a workbook you have access to.
' The workbo... | https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-refresh-data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.