Syncfusion.XlsIO.Base
Example 


Syncfusion.XlsIO Namespace > IWorksheet Interface : CreateRangesCollection Method

CreateRangesCollection Method

Creates a new instance of the IRanges.
Syntax
'Declaration
 
Function CreateRangesCollection() As IRanges
'Usage
 
Dim instance As IWorksheet
Dim value As IRanges
 
value = instance.CreateRangesCollection()
IRanges CreateRangesCollection()

Return Value

New instance of ranges collection.
Example
The following code illustrates how to creates a RangeCollection.
IWorkbook workbook = application.Workbooks.Create(1);
IWorksheet worksheet = workbook.Worksheets[0];
worksheet.Range["B3"].Number = 53.75;
worksheet.Range["B4"].Number = 52.85;
worksheet.Range["B5"].Number = 59.77;
worksheet.Range["B6"].Number = 96.15;
worksheet.Range["F1"].Number = 26.72;
worksheet.Range["F2"].Number = 33.71;
IRanges rangesOne = worksheet.CreateRangesCollection();
rangesOne.Add(worksheet.Range["B3:B6"]);
rangesOne.Add(worksheet.Range["F1:F2"]);
AssemblyVersion

Syncfusion.XlsIO.Base: 16.4460.0.40

See Also