Share via


ListObject.Publish Method (Excel)

Publishes the ListObject object to a server that is running Microsoft SharePoint Foundation.

Syntax

expression .Publish(Target, LinkSource)

expression A variable that represents a ListObject object.

Parameters

Name

Required/Optional

Data Type

Description

Target

Required

Variant

Contains an array of String values, as described in the Remarks section.

LinkSource

Required

Boolean

Return Value

A String value that represents the URL of the published list on the SharePoint site.

Remarks

The Target parameter contains an array of String elements, as described in the following table:

Element#

Contents

0

URL of SharePoint server

1

ListName (Display Name)

2

Description of the list. Optional.

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.

See Also

Concepts

ListObject Object

ListObject Object Members