def extract_named_ranges(defined_names) #:nodoc:
      named_ranges = []

      defined_names.each do |defined_name|
        name, index, range = defined_name

        # Skip autoFilter ranges.
        next if name == '_xlnm._FilterDatabase'

        # We are only interested in defined names with ranges.
        if range =~ /^([^!]+)!/
          sheet_name = $1

          # Match Print_Area and Print_Titles xlnm types.
          if name =~ /^_xlnm\.(.*)$/
            xlnm_type = $1
            name = "#{sheet_name}!#{xlnm_type}"
          elsif index != -1
            name = "#{sheet_name}!#{name}"
          end

          named_ranges << name
        end
      end

      named_ranges
    end
def extract_named_ranges(defined_names) #:nodoc:
      named_ranges = []

      defined_names.each do |defined_name|
        name, index, range = defined_name

        # Skip autoFilter ranges.
        next if name == '_xlnm._FilterDatabase'

        # We are only interested in defined names with ranges.
        if range =~ /^([^!]+)!/
          sheet_name = $1

          # Match Print_Area and Print_Titles xlnm types.
          if name =~ /^_xlnm\.(.*)$/
            xlnm_type = $1
            name = "#{sheet_name}!#{xlnm_type}"
          elsif index != -1
            name = "#{sheet_name}!#{name}"
          end

          named_ranges << name
        end
      end

      named_ranges
    end
Extract the named ranges from the sorted list of defined names. These are
 used in the App.xml file.