ListObject.Publish Method
Publishes the ListObject object to a server that is running Microsoft Windows SharePoint Services.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Function Publish ( _
Target As Object, _
LinkSource As Boolean _
) As String
'Usage
Dim instance As ListObject
Dim Target As Object
Dim LinkSource As Boolean
Dim returnValue As String
returnValue = instance.Publish(Target, _
LinkSource)
string Publish(
Object Target,
bool LinkSource
)
Parameters
Target
Type: System.ObjectRequired Object. Contains an Array of Strings. The following table describes the elements of this array:
Element#
Contents
0
URL of SharePoint server
1
ListName (Display Name)
2
Description of the list. Optional.
LinkSource
Type: System.BooleanRequired Boolean.
Return Value
Type: System.String
Remarks
This property returns a String which is the URL of the published list on the SharePoint site.
If the ListObject object 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 object is currently linked to a SharePoint site, setting LinkSource argument to True will replace the existing link (you can only link the list to one SharePoint site). If the ListObject object is not currently linked, setting LinkSource to False will leave the ListObject object unlinked. If the ListObject object is currently linked to a SharePoint site, setting LinkSource to False will keep the ListObject object linked to the current SharePoint site.