ListObject::Publish Method (Object^, Boolean)
Publishes the ListObject control to a server that is running Microsoft Windows SharePoint Services.
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Parameters
- Target
-
Type:
System::Object^
Contains an array of strings. The following table describes the elements of this array.
[1|1] Element#
[1|2] Contents
[2|1] 0
[2|2] URL of SharePoint server.
[3|1] 1
[3|2] ListName (Display Name).
[4|1] 2
[4|2] Description of the list.
- LinkSource
-
Type:
System::Boolean
Boolean. (See Remarks section.)
If the ListObject control is not currently linked to a list on a SharePoint site, setting LinkSource to true will create a new list on the specified SharePoint site. If the ListObject control is currently linked to a SharePoint site, setting the LinkSource argument to true will replace the existing link (you can only link the list to one SharePoint site). If the ListObject control is not currently linked, setting LinkSource to false will leave the ListObject control unlinked. If the ListObject control is currently linked to a SharePoint site, setting LinkSource to false will keep the ListObject control linked to the current SharePoint site.
The following code example creates a ListObject on the current worksheet and then calls the Publish method to publish the ListObject to a Web site that is running Microsoft Windows SharePoint Services. This example assumes that the SharePointURL parameter identifies a valid URL to a Web site running Microsoft Windows SharePoint Services.
This example is for a document-level customization.