diff options
| author | Jurriaan Pruis <[email protected]> | 2012-04-01 15:48:37 +0200 |
|---|---|---|
| committer | Jurriaan Pruis <[email protected]> | 2012-04-01 15:48:37 +0200 |
| commit | 16f19d36a774a578f4a6892caab320dd262b8e71 (patch) | |
| tree | 917fdd9837a990f466b506d4813cb71ac57d92c9 /lib | |
| parent | 5a567dd9fad7cb4739c92d2dda3faba8d50225b6 (diff) | |
| download | caxlsx-16f19d36a774a578f4a6892caab320dd262b8e71.tar.gz caxlsx-16f19d36a774a578f4a6892caab320dd262b8e71.zip | |
String table ignore nil values
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/axlsx/workbook/shared_strings_table.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 = "" |
