diff --git a/app/assets/images/import_instruction.png b/app/assets/images/import_instruction.png new file mode 100644 index 000000000..0aacfffc5 Binary files /dev/null and b/app/assets/images/import_instruction.png differ diff --git a/app/services/repository_xlsx_export.rb b/app/services/repository_xlsx_export.rb index c75ddf319..eeeac4345 100644 --- a/app/services/repository_xlsx_export.rb +++ b/app/services/repository_xlsx_export.rb @@ -10,6 +10,8 @@ module RepositoryXlsxExport sheet.add_row prepare_header(repository, column_ids, false) end + add_instruction(workbook) + package.to_stream.read end @@ -63,10 +65,17 @@ module RepositoryXlsxExport end end + add_instruction(workbook) + package.to_stream.read end - private + def self.add_instruction(workbook) + workbook.add_worksheet(name: 'Instruction') do |sheet| + image = File.expand_path('app/assets/images/import_instruction.png') + sheet.add_image(image_src: image, start_at: 'A1', width: 1260, height: 994) + end + end def self.prepare_header(repository, column_ids, add_consumption) header = []