/// <summary> /// Gets the individual cell ranges within a range. /// </summary> /// <param name="range">The range.</param> /// <returns> /// The individual cell ranges within the specified range. /// </returns> /// <exception cref="ArgumentNullException"><paramref name="range"/> is null.</exception> public static IReadOnlyCollection <Range> GetCellRanges( this Range range) { if (range == null) { throw new ArgumentNullException(nameof(range)); } var result = range.GetCells().Select(_ => _.GetRange()).ToList(); return(result); }