Skip to main content

TdxSpreadSheetDefinedNames.AddOrSet(string,string,TdxSpreadSheetCustomView) Method

Declares a new defined name or assigns another caption, scope, and/or reference to an existing defined name.

Declaration

function AddOrSet(const ACaption: string; const AReference: string; AScope: TdxSpreadSheetCustomView = nil): TdxSpreadSheetDefinedName;

Parameters

Name Type
ACaption string
AReference string
AScope TdxSpreadSheetCustomView

Returns

Type
TdxSpreadSheetDefinedName

Remarks

Call this function to either create a new defined name or redefine one of the existing names within a workbook currently opened in the Spreadsheet control.

Pass a unique name as the ACaption parameter to call this function in the same manner as the Add function. If the specified name matches one of the currently existing defined names within the scope indicated by the AScope parameter, the AddOrSet function redefines the name’s reference. The AddOrSet function uses the GetItemByName property to identify whether the defined name with a specified caption actually exists.

See Also