Last active
December 15, 2015 16:09
-
-
Save covard/5287222 to your computer and use it in GitHub Desktop.
Get roo row data in a hash with headers as the key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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