Sha256: af6b57905d232434ee8f676fc84ca9c23c656bc1fe6870b620538531cfd0c58a

Contents?: true

Size: 665 Bytes

Versions: 1

Compression:

Stored size: 665 Bytes

Contents

module RubyXL
  module Writer
   class SharedStringsWriter < GenericWriter

      def filepath
        File.join('xl', 'sharedStrings.xml')
      end

      def write()
        # Excel doesn't care much about the contents of sharedStrings.xml -- it will fill it in, but the file has to exist and have a root node.
        if @workbook.shared_strings_XML
          contents = @workbook.shared_strings_XML
        else
          contents = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+"\n"+'<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="0" uniqueCount="0"></sst>'
        end
        contents
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubyXL-git-ref-6002046-2.0.0 lib/rubyXL/writer/shared_strings_writer.rb