Syncfusion.XlsIO.Base
Example 


Syncfusion.XlsIO Namespace > IWorksheet Interface : CreateNamedRanges Method
Existing named ranged.
Address of the named range to be created.
True if the named range values are vertically placed in the sheet.

CreateNamedRanges Method

Creates a named ranges with the specified named range's value as a name for the specified range.
Syntax
'Declaration
 
Sub CreateNamedRanges( _
   ByVal namedRange As String, _
   ByVal referRange As String, _
   ByVal vertical As Boolean _
) 
'Usage
 
Dim instance As IWorksheet
Dim namedRange As String
Dim referRange As String
Dim vertical As Boolean
 
instance.CreateNamedRanges(namedRange, referRange, vertical)
void CreateNamedRanges( 
   string namedRange,
   string referRange,
   bool vertical
)

Parameters

namedRange
Existing named ranged.
referRange
Address of the named range to be created.
vertical
True if the named range values are vertically placed in the sheet.
Remarks
This method is used to access the discontinuous ranges.
Example
IWorkbook workbook = application.Workbooks.Create(1);
IWorksheet sheet = workbook.Worksheets[0];
IName name = sheet.Names.Add("B1name",sheet["B1:D1"]);
sheet["B1"].Value = "B2name";
sheet["C1"].Value = "C2name";
sheet["D1"].Value = "D2name";
sheet.CreateNamedRanges("B1name", "B2:D2", true);
AssemblyVersion

Syncfusion.XlsIO.Base: 16.3460.0.29

See Also