Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

Delphi
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