Skip to content

Instantly share code, notes, and snippets.

@volo1st
Last active December 28, 2015 10:59
Show Gist options
  • Save volo1st/7490577 to your computer and use it in GitHub Desktop.
Save volo1st/7490577 to your computer and use it in GitHub Desktop.
String interpolation testing for Ruby gem `spreadsheet`
require 'spreadsheet'
Spreadsheet.client_encoding = 'UTF-8'
test_data = {:foo => 'a/a', :bar => 'normal'}
book = Spreadsheet::Workbook.new
sheet = book.create_worksheet :name => "#{test_data[:foo]}"
sheet = book.create_worksheet :name => "#{test_data[:bar]}"
book.write "test.xls"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment