lib/rbbt/tsv/excel.rb in rbbt-util-5.38.0 vs lib/rbbt/tsv/excel.rb in rbbt-util-5.38.1
- old
+ new
@@ -152,10 +152,14 @@
book = Spreadsheet::Workbook.new
sheet1 = book.create_worksheet
sheet1.name = sheet if sheet
- sheet1.row(0).concat fields
+ if fields
+ sheet1.row(0).concat fields if fields
+ else
+ sheet1.row(0).concat ["No field info"]
+ end
rows.each_with_index do |cells,i|
sheet1.row(i+1).concat cells
end