Example #1
0
        public static RangeSize From(object[,] data)
        {
            var size = new RangeSize()
                       .SetFrom(data);

            return(size);
        }
Example #2
0
        public static RangeSize SetFrom(this RangeSize rangeSize, int rows, int columns)
        {
            rangeSize.Rows    = rows;
            rangeSize.Columns = columns;

            return(rangeSize);
        }
Example #3
0
        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);
        }
Example #4
0
        /// <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);
        }