Пример #1
0
        /// <summary>
        /// Creates an auto-filter on the specified range.
        /// </summary>
        /// <param name="range">The range.</param>
        /// <exception cref="ArgumentNullException"><paramref name="range"/> is null.</exception>
        public static void SetAutoFilter(
            this Range range)
        {
            if (range == null)
            {
                throw new ArgumentNullException(nameof(range));
            }

            range.Worksheet.AutoFilter.Range = range.GetName();
        }