This topic has not yet been rated - Rate this topic

ListObject.SharePointURL Property

Gets the URL of the SharePoint list for a given ListObject control.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
string SharePointURL { get; }

Property Value

Type: String
The URL of the SharePoint list for a given ListObject control.

Accessing this property causes an exception to be thrown if the list is not linked to a SharePoint site.

The following code example publishes a ListObject to a Web site that is running Microsoft Windows SharePoint Services. This example assumes that there is a ListObject named customerListObject on the current worksheet, and that the ListObject is linked to a SharePoint site.

This example is for a document-level customization.

private void ListObject_SharePointURL()
{
    string[] TargetParam = { customerListObject.SharePointURL,
        "Customers", "Customer data" };
    customerListObject.Publish(TargetParam, false);
}
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.