Skip to main content

AddListObject

Adds a formatted table to the worksheet and returns the ApiListObject object.

note

This functionality is available in paid ONLYOFFICE Docs editions.

Syntax

expression.AddListObject(sSourceType, sSource, bLinkSource, sHasHeaders, sDestination, sTableStyleName);

expression - A variable that represents a ApiWorksheet class.

Parameters

NameRequired/OptionalData typeDefaultDescription
sSourceTypeOptionalXlListObjectSourceType"xlSrcRange"The source type for the table. Currently only "xlSrcRange" is supported.
sSourceOptionalstringThe range to which the table will be applied, e.g. "A1:D10". Required when sSourceType is "xlSrcRange".
bLinkSourceOptionalbooleanfalseNot supported.
sHasHeadersOptionalXlYesNoGuess"xlGuess"Specifies whether the source range has column labels.
sDestinationOptionalstringNot supported.
sTableStyleNameOptionalstring"TableStyleLight9"The table style name.

Returns

ApiListObject | null