Method: Axlsx::Package#to_stream
- Defined in:
- lib/axlsx/package.rb
#to_stream(confirm_valid = false) ⇒ StringIO|Boolean
Serialize your workbook to a StringIO instance
114 115 116 117 118 119 120 121 |
# File 'lib/axlsx/package.rb', line 114 def to_stream(confirm_valid=false) return false unless !confirm_valid || self.validate.empty? Relationship.clear_cached_instances zip = write_parts(Zip::OutputStream.new(StringIO.new, true)) stream = zip.close_buffer stream.rewind stream end |