From 16f19d36a774a578f4a6892caab320dd262b8e71 Mon Sep 17 00:00:00 2001 From: Jurriaan Pruis Date: Sun, 1 Apr 2012 15:48:37 +0200 Subject: String table ignore nil values --- lib/axlsx/workbook/shared_strings_table.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/axlsx/workbook/shared_strings_table.rb b/lib/axlsx/workbook/shared_strings_table.rb index dac8221f..332a4470 100644 --- a/lib/axlsx/workbook/shared_strings_table.rb +++ b/lib/axlsx/workbook/shared_strings_table.rb @@ -29,7 +29,7 @@ module Axlsx # Creates a new Shared Strings Table agains an array of cells # @param [Array] cells This is an array of all of the cells in the workbook def initialize(cells) - cells = cells.flatten.reject { |c| c.type != :string || c.value.start_with?('=') } + cells = cells.flatten.reject { |c| c.type != :string || c.value.nil? || c.value.start_with?('=') } @count = cells.size @unique_cells = [] @shared_xml_string = "" -- cgit v1.2.3