Skip to content

Instantly share code, notes, and snippets.

@covard
Last active December 15, 2015 16:09
Show Gist options
  • Save covard/5287222 to your computer and use it in GitHub Desktop.
Save covard/5287222 to your computer and use it in GitHub Desktop.
Get roo row data in a hash with headers as the key
workbook.default_sheet = workbook.sheets.first
header = workbook.row(1)
(2..workbook.last_row).each do |i|
row_data_hash = Hash[[header, workbook.row(i)].transpose]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment