Sha256: 68b3f238c4541ba67a7f9a248a01b2e9e7eddc932a8e084d75b80c5653eeefb0
Contents?: true
Size: 587 Bytes
Versions: 17
Compression:
Stored size: 587 Bytes
Contents
require 'axlsx' module Adhoq module Reporter class Xlsx def self.mime_type 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' end def initialize(result) @result = result end def build_report xlsx = Axlsx::Package.new write_result!(xlsx) xlsx.to_stream end private def write_result!(xlsx) xlsx.workbook.add_worksheet do |sheet| sheet.add_row @result.header @result.rows.each {|row| sheet.add_row row } end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems