Skip to content

Instantly share code, notes, and snippets.

@MicahBrown
Last active September 12, 2018 22:28
Show Gist options
  • Save MicahBrown/0343dc18b0f4e937a2831363867e5ba4 to your computer and use it in GitHub Desktop.
Save MicahBrown/0343dc18b0f4e937a2831363867e5ba4 to your computer and use it in GitHub Desktop.
data_file = Roo::Excelx.new('spreadsheet.xlsx')
sheet1 = data_file.sheet(0)
sheet2 = data_file.sheet(1)
puts sheet1.row(1).inspect
puts sheet2.row(1).inspect
# Gives this output
["Sheet 2"]
["Sheet 2"]
# Expected this output
["Sheet 1"]
["Sheet 2"]
# Sheet 1 (row 1 column 1)
Sheet 1
# Sheet 2 (row 1 column 1)
Sheet 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment