def autofilter(*args)
    # Check for a cell reference in A1 notation and substitute row and column
    args = row_col_notation(args)

    return if args.size != 4 # Require 4 parameters

    row_min, col_min, row_max, col_max = args

    # Reverse max and min values if necessary.
    row_min, row_max = row_max, row_min if row_max < row_min
    col_min, col_max = col_max, col_min if col_max < col_min

    # Store the Autofilter information
    @filter_area.row_min = row_min
    @filter_area.row_max = row_max
    @filter_area.col_min = col_min
    @filter_area.col_max = col_max
  end
def autofilter(*args)
    # Check for a cell reference in A1 notation and substitute row and column
    args = row_col_notation(args)

    return if args.size != 4 # Require 4 parameters

    row_min, col_min, row_max, col_max = args

    # Reverse max and min values if necessary.
    row_min, row_max = row_max, row_min if row_max < row_min
    col_min, col_max = col_max, col_min if col_max < col_min

    # Store the Autofilter information
    @filter_area.row_min = row_min
    @filter_area.row_max = row_max
    @filter_area.col_min = col_min
    @filter_area.col_max = col_max
  end
:call-seq:
    autofilter(first_row, first_col, last_row, last_col)
    autofilter("A1:G10")

 Set the autofilter area in the worksheet.


 This method allows an autofilter to be added to a worksheet. An
 autofilter is a way of adding drop down lists to the headers of a 2D range
 of worksheet data. This is turn allow users to filter the data based on
 simple criteria so that some data is highlighted and some is hidden.

 To add an autofilter to a worksheet:

     worksheet.autofilter(0, 0, 10, 3)
     worksheet.autofilter('A1:D11')    # Same as above in A1 notation.

 Filter conditions can be applied using the filter_column() method.

 See the autofilter.rb program in the examples directory of the distro
 for a more detailed example.