Bewerken

Delen via


PublishObjects.Add Method

Definition

Creates an object that represents an item in a document saved to a Web page. Such objects facilitate subsequent updates to the Web page while automated changes are being made to the document in Microsoft Excel. Returns a PublishObject object.

public Microsoft.Office.Interop.Excel.PublishObject Add (Microsoft.Office.Interop.Excel.XlSourceType SourceType, string Filename, object Sheet, object Source, object HtmlType, object DivID, object Title);
Public Function Add (SourceType As XlSourceType, Filename As String, Optional Sheet As Object, Optional Source As Object, Optional HtmlType As Object, Optional DivID As Object, Optional Title As Object) As PublishObject

Parameters

SourceType
XlSourceType

Required XlSourceType. The source type.

Filename
String

Required String. The URL (on the intranet or the Web) or path (local or network) to which the source object was saved.

Sheet
Object

Optional Object. The name of the worksheet that was saved as a Web page.

Source
Object

Optional Object. A unique name used to identify items that have one of the following constants as their SourceType argument: xlSourceAutoFilter, xlSourceChart, xlSourcePivotTable, xlSourcePrintArea, xlSourceQuery, or xlSourceRange. If SourceType is xlSourceRange, Source specifies a range, which can be a defined name. If SourceType is xlSourceChart, xlSourcePivotTable, or xlSourceQuery, Source specifies the name of a chart, PivotTable report, or query table.

HtmlType
Object

Optional Object. Specifies whether the item is saved as an interactive Microsoft Office Web component or as static text and images. Can be one of the following XlHtmlType constants.ConstantDescriptionxlHtmlCalcItem saved as an interactive Microsoft Office Spreadsheet component.xlHtmlChartItem saved as an interactive Microsoft Office Chart component.xlHtmlListItem saved as an interactive Microsoft Office PivotTable component.xlHtmlStaticItem saved as static text and images.

DivID
Object

Optional Object. The unique identifier used in the HTML DIV tag to identify the item on the Web page.

Title
Object

Optional Object. The title of the Web page.

Returns

Applies to