public static RangeSize From(object[,] data) { var size = new RangeSize() .SetFrom(data); return(size); }
public static RangeSize SetFrom(this RangeSize rangeSize, int rows, int columns) { rangeSize.Rows = rows; rangeSize.Columns = columns; return(rangeSize); }
public static RangeSize SetFrom(this RangeSize rangeSize, object[,] data) { int rows = data.GetLength(0); int columns = data.GetLength(1); rangeSize.SetFrom(rows, columns); return(rangeSize); }
/// <summary> /// Gets a range of the specified size with this range as the upper-left corner. /// </summary> public static Range GetRange(this Range range, RangeSize size) { var output = range.Worksheet.GetRange(range, size.Rows, size.Columns); return(output); }