ID、タスク、説明の列を含む Excel シートを作成しました
これを見つけて、seeds.rb に入れます。
require 'spreadsheet'
Spreadsheet.open('/db/data/uebung.xls') do |uebung|
book.worksheet('Sheet1').each do |row|
break if row[0].nil?
puts row.join(',')
end
end
次のメッセージが表示されます。
[DEPRECATED] By requiring 'parseexcel', 'parseexcel/parseexcel' and/or
'parseexcel/parser' you are loading a Compatibility layer which
provides a drop-in replacement for the ParseExcel library. This
code makes the reading of Spreadsheet documents less efficient and
will be removed in Spreadsheet version 1.0.0
どう思いますか。Excelデータのインポートは簡単ではありませんか?