Click or drag to resize

XlsRange Intersect Method

Returns intersection of this range with the specified one.
Examples
The following code illustrates how to perform intersectwith in the Range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Get intersect range</para><para>IXLSRange range = worksheet.Range["A16:C16"];</para><para>IXLSRange commonRange = worksheet.Range["B16:D16"].Intersect(range);</para><para>//Save to file</para><para>workbook.SaveToFile("Intersect.xlsx");</para>

Namespace: Spire.Xls.Core.Spreadsheet
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
public IXLSRange Intersect(
	IXLSRange range
)

Parameters

range
Type: Spire.Xls.Core IXLSRange
The Range with which to intersect.

Return Value

Type: IXLSRange
Range intersection. If there is no intersection, NULL is returned.

Implements

IXLSRange Intersect(IXLSRange)
See Also