Skip to content

Instantly share code, notes, and snippets.

@iox
Created December 11, 2014 11:17
Show Gist options
  • Save iox/6278d60911212d31d08d to your computer and use it in GitHub Desktop.
Save iox/6278d60911212d31d08d to your computer and use it in GitHub Desktop.
Generate a simple XLS file to show Currency Excel bug
require 'spreadsheet'
book = Spreadsheet::Workbook.new
sheet1 = book.create_worksheet
sheet1.row(0).concat %w{Product Price}
sheet1.row(1).concat ['PC', 1000.55]
sheet1.row(2).concat ['Phone', 200.25]
sheet1.row(3).concat ['Radio', 20.45]
book.write 'spreadsheet_currency_test.xls'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment