Module: Importo::TestHelpers
- Defined in:
- lib/importo/test_helpers.rb
Instance Method Summary collapse
Instance Method Details
#simple_sheet(an_array, sheet_name: "Import") ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/importo/test_helpers.rb', line 7 def simple_sheet(an_array, sheet_name: "Import") xls = Axlsx::Package.new workbook = xls.workbook sheet = workbook.add_worksheet(name: sheet_name) an_array.each do |a| sheet.add_row a end xls.to_stream end |