creek 2.6.2 → 2.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +1 -1
- data/README.md +1 -1
- data/lib/creek/book.rb +2 -0
- data/lib/creek/drawing.rb +2 -0
- data/lib/creek/shared_strings.rb +2 -0
- data/lib/creek/sheet.rb +12 -4
- data/lib/creek/styles/converter.rb +2 -0
- data/lib/creek/styles/style_types.rb +2 -0
- data/lib/creek/styles.rb +2 -0
- data/lib/creek/utils.rb +2 -0
- data/lib/creek/version.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1b4c7fc5370d7342b94d1093ee6c862720df9ba290513719eb726c91beb67d9
|
4
|
+
data.tar.gz: 54000d7369f0b38f19486d6d15355fcda2baf9b848173e5a7d9e50c537626959
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34c2a023e06a47258b430595db38b3a2eb8b56df7e9b5b41c7b8e6878803e155adff60849b3d6568f6afe7f0ffb38dbd0cf7c333871e09bb7dcc1957e7ef3e33
|
7
|
+
data.tar.gz: bacf97b02bef5b6eeefb6acdd3a74e9af621aeeff2ea8688486c19f2e9860ada8dd7b65499d4b1c79eef981b92b4ed4b966c6c4390b3f38ec575a66055316c24
|
data/.github/workflows/test.yml
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
[![version](https://badge.fury.io/rb/creek.svg)](https://badge.fury.io/rb/creek)
|
2
|
-
[![downloads](https://
|
2
|
+
[![downloads](https://img.shields.io/gem/dt/creek)](https://rubygems.org/gems/creek)
|
3
3
|
|
4
4
|
# Creek - Stream parser for large Excel (xlsx and xlsm) files.
|
5
5
|
|
data/lib/creek/book.rb
CHANGED
data/lib/creek/drawing.rb
CHANGED
data/lib/creek/shared_strings.rb
CHANGED
data/lib/creek/sheet.rb
CHANGED
@@ -99,6 +99,10 @@ module Creek
|
|
99
99
|
cell_style_idx = nil
|
100
100
|
@book.files.file.open(path) do |xml|
|
101
101
|
prefix = ''
|
102
|
+
name_row = "row"
|
103
|
+
name_c = "c"
|
104
|
+
name_v = "v"
|
105
|
+
name_t = "t"
|
102
106
|
Nokogiri::XML::Reader.from_io(xml).each do |node|
|
103
107
|
if prefix.empty? && node.namespaces.any?
|
104
108
|
namespace = node.namespaces.detect{|_key, uri| uri == SPREADSHEETML_URI }
|
@@ -107,13 +111,17 @@ module Creek
|
|
107
111
|
else
|
108
112
|
''
|
109
113
|
end
|
114
|
+
name_row = "#{prefix}row"
|
115
|
+
name_c = "#{prefix}c"
|
116
|
+
name_v = "#{prefix}v"
|
117
|
+
name_t = "#{prefix}t"
|
110
118
|
end
|
111
|
-
if node.name ==
|
119
|
+
if node.name == name_row && node.node_type == opener
|
112
120
|
row = node.attributes
|
113
121
|
row['cells'] = {}
|
114
122
|
cells = {}
|
115
123
|
y << (include_meta_data ? row : cells) if node.self_closing?
|
116
|
-
elsif node.name ==
|
124
|
+
elsif node.name == name_row && node.node_type == closer
|
117
125
|
processed_cells = fill_in_empty_cells(cells, row['r'], cell, use_simple_rows_format)
|
118
126
|
@headers = processed_cells if with_headers && row['r'] == HEADERS_ROW_NUMBER
|
119
127
|
|
@@ -127,11 +135,11 @@ module Creek
|
|
127
135
|
|
128
136
|
row['cells'] = processed_cells
|
129
137
|
y << (include_meta_data ? row : processed_cells)
|
130
|
-
elsif node.name ==
|
138
|
+
elsif node.name == name_c && node.node_type == opener
|
131
139
|
cell_type = node.attributes['t']
|
132
140
|
cell_style_idx = node.attributes['s']
|
133
141
|
cell = node.attributes['r']
|
134
|
-
elsif
|
142
|
+
elsif (node.name == name_v || node.name == name_t) && node.node_type == opener
|
135
143
|
unless cell.nil?
|
136
144
|
node.read
|
137
145
|
cells[cell] = convert(node.value, cell_type, cell_style_idx)
|
data/lib/creek/styles.rb
CHANGED
data/lib/creek/utils.rb
CHANGED
data/lib/creek/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: creek
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pythonicrubyist
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|