def get_sheet_index(sheet_name)
    ruby_19 { sheet_name = convert_to_ascii_if_ascii(sheet_name) }

    # Handle utf8 sheetnames
    if is_utf8?(sheet_name)
      ruby_18 { sheet_name = utf8_to_16be(sheet_name) } ||
      ruby_19 { sheet_name = sheet_name.encode('UTF-16BE') }
    end

    if @ext_sheets[sheet_name].nil?
      raise "Unknown sheet name '#{sheet_name}' in formula\n"
    else
      return @ext_sheets[sheet_name]
    end
  end
def get_sheet_index(sheet_name)
    ruby_19 { sheet_name = convert_to_ascii_if_ascii(sheet_name) }

    # Handle utf8 sheetnames
    if is_utf8?(sheet_name)
      ruby_18 { sheet_name = utf8_to_16be(sheet_name) } ||
      ruby_19 { sheet_name = sheet_name.encode('UTF-16BE') }
    end

    if @ext_sheets[sheet_name].nil?
      raise "Unknown sheet name '#{sheet_name}' in formula\n"
    else
      return @ext_sheets[sheet_name]
    end
  end
Look up the index that corresponds to an external sheet name. The hash of
 sheet names is updated by the add_worksheet() method of the Workbook class.