Sha256: 69e246477b1342479bd13c99261f6e22669faedcfa8b2afc3a032e2d268608b8
Contents?: true
Size: 499 Bytes
Versions: 39
Compression:
Stored size: 499 Bytes
Contents
class Agilibox::Serializers::XLSX < Agilibox::Serializers::Base def render_inline xlsx.to_stream.read.force_encoding("BINARY") end def render_file(file_path) xlsx.serialize(file_path) end def xlsx @xlsx ||= Axlsx::Package.new do |p| p.workbook.add_worksheet do |sheet| data.each do |line| values = line.map { |value| self.class.format(value) } sheet.add_row(values) end end p.use_shared_strings = true end end end
Version data entries
39 entries across 39 versions & 1 rubygems