Skip to content

Instantly share code, notes, and snippets.

@gotjosh
Created April 15, 2011 04:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gotjosh/921122 to your computer and use it in GitHub Desktop.
Save gotjosh/921122 to your computer and use it in GitHub Desktop.
require 'spreadsheet'
book = Spreadsheet.open 'teams.xls'
sheet = book.worksheet 0
sheet.each do |row|
team = Team.new
team.name = row[0].strip
team.code = row[1].strip
team.save
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment