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