次の方法で共有


ListObject.SharePointURL Property

Definition

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

public:
 property System::String ^ SharePointURL { System::String ^ get(); };
public string SharePointURL { get; }
member this.SharePointURL : string
Public ReadOnly Property SharePointURL As String

Property Value

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

Examples

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);
}
Private Sub ListObject_SharePointURL()
    Dim TargetParam As String() = {customerListObject.SharePointURL, _
        "Customers", "Customer data"}
    customerListObject.Publish(TargetParam, False)
End Sub

Remarks

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

Applies to