Class RangeExtensions
- Namespace
- OfficeOpenXml
- Assembly
- EPPlus.dll
Extension methods for ExcelRangeBase
public static class RangeExtensions
- Inheritance
-
RangeExtensions
- Inherited Members
Methods
SkipColumns(ExcelRangeBase, int)
Returns a new range, created by skipping a number of columns from the start.
public static ExcelRangeBase SkipColumns(this ExcelRangeBase range, int count)
Parameters
range
ExcelRangeBaseThe source range
count
intThe number of columns to skip
Returns
- ExcelRangeBase
The result range
SkipRows(ExcelRangeBase, int)
Returns a new range, created by skipping a number of rows from the start.
public static ExcelRangeBase SkipRows(this ExcelRangeBase range, int count)
Parameters
range
ExcelRangeBaseThe source range
count
intThe number of rows to skip
Returns
- ExcelRangeBase
The result range
TakeColumns(ExcelRangeBase, int)
Returns a new range, created by taking a number of columns from the start.
If count
is greater than number of columns in the source range
the entire source range will be returned.
public static ExcelRangeBase TakeColumns(this ExcelRangeBase range, int count)
Parameters
range
ExcelRangeBaseThe source range
count
intThe number of columns to take
Returns
- ExcelRangeBase
The result range
TakeColumnsBetween(ExcelRangeBase, int, int)
Returns a new range, created by taking a specific number of columns between from the offset parameter.
public static ExcelRangeBase TakeColumnsBetween(this ExcelRangeBase range, int offset, int count)
Parameters
range
ExcelRangeBaseThe source range
offset
intOffset of the start-column (zero-based)
count
intThe number of columns to take
Returns
- ExcelRangeBase
The result range
TakeRows(ExcelRangeBase, int)
Returns a new range, created by taking a number of rows from the start.
If count
is greater than number of rows in the source range
the entire source range will be returned.
public static ExcelRangeBase TakeRows(this ExcelRangeBase range, int count)
Parameters
range
ExcelRangeBaseThe source range
count
intThe number of columns to take
Returns
- ExcelRangeBase
The result range
TakeRowsBetween(ExcelRangeBase, int, int)
Returns a new range, created by taking a specific number of rows based on the offset parameter.
public static ExcelRangeBase TakeRowsBetween(this ExcelRangeBase range, int offset, int count)
Parameters
range
ExcelRangeBaseThe source range
offset
intOffset of the start-row (zero-based)
count
intThe number of rows to take
Returns
- ExcelRangeBase
The result range
TakeSingleCell(ExcelRangeBase, int, int)
Returns a single cell within a range
public static ExcelRangeBase TakeSingleCell(this ExcelRangeBase range, int rowOffset, int columnOffset)
Parameters
range
ExcelRangeBaseThe source range
rowOffset
intOffset of the cell's row within the range (zero-based)
columnOffset
intOffset of the cell's column within the range (zero-based)
Returns
TakeSingleColumn(ExcelRangeBase, int)
Returns a single column as a new range.
public static ExcelRangeBase TakeSingleColumn(this ExcelRangeBase range, int offset)
Parameters
range
ExcelRangeBaseThe source range
offset
intOffset of the column (zero-based) in the source range
Returns
- ExcelRangeBase
The requested row
TakeSingleRow(ExcelRangeBase, int)
Returns a single row as a new range.
public static ExcelRangeBase TakeSingleRow(this ExcelRangeBase range, int offset)
Parameters
range
ExcelRangeBaseThe source range
offset
intOffset of the row (zero-based) in the source range
Returns
- ExcelRangeBase
The requested row