Manipulate Named Range in a Workbook

Possible Usage Scenarios

Aspose.Cells supports the manipulation of existing named ranges. All the existing named ranges can be accessed from Workbook.GetWorksheets().GetNames() collection. Once, you access the named range, you can change its various methods e.g. GetFullText and GetRefersTo.

Manipulate Named Range in a Workbook

The following sample code reads the first named-range inside the source excel file and prints its FullText and RefersTo properties on the console. After that, it modifies RefersTo property and saves the output excel file.

Sample Code

Console Output

The following console output prints the values of FullText and RefersTo members of the existing Named Range in the above code.

 Full Text: TestRange

Refers To: =Sheet1!$D$3:$G$6