Sha256: f86abfa5a38952202776ab892072753485483db24e7d656eef756fb23c3bc20b

Contents?: true

Size: 1.03 KB

Versions: 18

Compression:

Stored size: 1.03 KB

Contents

# require File.expand_path(File.join(File.dirname(__FILE__),'workbook'))
# require File.expand_path(File.join(File.dirname(__FILE__),'worksheet'))
# require File.expand_path(File.join(File.dirname(__FILE__),'cell'))
# require File.expand_path(File.join(File.dirname(__FILE__),'color'))
require 'rubygems'
require 'nokogiri'

module RubyXL
module Writer
 class SharedStringsWriter
    attr_accessor :dirpath, :filepath, :workbook

    def initialize(dirpath,wb)
      @dirpath = dirpath
      @workbook = wb
      @filepath = dirpath + '/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

18 entries across 18 versions & 3 rubygems

Version Path
listen360-rubyXL-1.2.10.2 lib/rubyXL/writer/shared_strings_writer.rb
listen360-rubyXL-1.2.10.1 lib/rubyXL/writer/shared_strings_writer.rb
thunderboltlabs-rubyXL-1.2.10.2 lib/rubyXL/writer/shared_strings_writer.rb
thunderboltlabs-rubyXL-1.2.10.1 lib/rubyXL/writer/shared_strings_writer.rb
rubyXL-1.2.10 lib/rubyXL/writer/shared_strings_writer.rb
rubyXL-1.2.9 lib/rubyXL/writer/shared_strings_writer.rb
rubyXL-1.2.8 lib/rubyXL/writer/shared_strings_writer.rb
rubyXL-1.2.7 lib/rubyXL/writer/shared_strings_writer.rb
rubyXL-1.2.6 lib/rubyXL/writer/shared_strings_writer.rb
rubyXL-1.2.5 lib/rubyXL/writer/shared_strings_writer.rb
rubyXL-1.2.4 lib/rubyXL/writer/shared_strings_writer.rb
rubyXL-1.2.3 lib/rubyXL/writer/shared_strings_writer.rb
rubyXL-1.2.2 lib/rubyXL/writer/shared_strings_writer.rb
rubyXL-1.2.1 lib/rubyXL/writer/shared_strings_writer.rb
rubyXL-1.2.0 lib/rubyXL/writer/shared_strings_writer.rb
rubyXL-1.1.12 lib/rubyXL/writer/shared_strings_writer.rb
rubyXL-1.1.11 lib/rubyXL/writer/shared_strings_writer.rb
rubyXL-1.1.10 lib/rubyXL/writer/shared_strings_writer.rb