# encoding: utf-8 wb = xlsx_package.workbook wb.add_worksheet(name: @custom_album.name[0..100]) do |sheet| sheet.merge_cells "A1:C1" heading = sheet.styles.add_style(:b => true, :locked => true, :alignment=>{:horizontal => :center}) example = sheet.styles.add_style(:i => true) row = [] row1 = [] row2 = [] row << "Import for custom_album #{@custom_album.name}" row1 << t("custom_gallery.img_link") row2 << "http://www.example.com/example.jpg" row1 << t("custom_gallery.img_description") + "(" + t(:zh_tw) + ")" row2 << "This is an image" row1 << t("custom_gallery.img_description") + "(" + t(:en) + ")" row2 << "This is an image" sheet.add_row row, :style => heading sheet.add_row row1 sheet.add_row row2, :style => example end