Spreadsheet - лучший анализатор Excel, который я нашел до сих пор.Он предлагает довольно много функций.
Вы говорите, что используете Paperclip для вложений, что хорошо.Однако, если вы сохраняете вложения в S3 (что, как я полагаю, поскольку вы используете Heroku), синтаксис для передачи файла в электронную таблицу немного отличается, но не сложен.
Вот пример чистого синтаксиса, который можетиспользоваться и не помещаться ни в какие классы или модули, так как я не знаю, как вы собираетесь начать разбор контактов.
# load the gem
require 'spreadsheet'
# In this example the model MyFile has_attached_file :attachment
@workbook = Spreadsheet.open(MyFile.first.attachment.to_file)
# Get the first worksheet in the Excel file
@worksheet = @workbook.worksheet(0)
# It can be a little tricky looping through the rows since the variable
# @worksheet.rows often seem to be empty, but this will work:
0.upto @worksheet.last_row_index do |index|
# .row(index) will return the row which is a subclass of Array
row = @worksheet.row(index)
@contact = Contact.new
#row[0] is the first cell in the current row, row[1] is the second cell, etc...
@contact.first_name = row[0]
@contact.last_name = row[1]
@contact.save
end