rxl 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f467cf6e34036f5c94a8c09df697ec71f88fcb7
4
- data.tar.gz: 166c99a409ceb6d2b55fda7dbacf933a53945ee7
3
+ metadata.gz: bf28a78758ad3f6a3125124fafa005633b905556
4
+ data.tar.gz: a9e6b11e54544b1ebd4e99e2cc4dd23dfd2e319f
5
5
  SHA512:
6
- metadata.gz: f2ba3b221640b2d9fcc97f52c39ba1f72ec6b669fdc40635ef7f767b28f830f8b279d1af6262df9e8d30ae0c3a744b3a5e981e065606fff3de8d69ab10823ccf
7
- data.tar.gz: 93566e03d5e656b5085361ba99ce2d8cf6c1a1ac173c5f0b976d7d646cfa24c68348536612d5a1e3f84a5ff1da37286732734f91bb8618764bc2d5c84a2c2402
6
+ metadata.gz: bc3b3ace8c026a05a135e2217c34753a699e3b736751ffe7663d4d1d223d73e0e8ca99af7a2a35aa19025a82fdbd37ae6b9f49e056a0944ddeeff5feab593ce0
7
+ data.tar.gz: 4fc91d3480b8a8cdb34919b2507d1f967f04bc187c6d55057cfaef1b1b3facad5e9696aae84a9b1501891d47eb637cbc067d2aaa0426bf7c9709a2a42bd4cf7b
data/README.md CHANGED
@@ -74,7 +74,11 @@ Further to the above, these rules are applied by Rxl when parsing cells:
74
74
 
75
75
  ### Read tables from file
76
76
 
77
- To read a file where the data is in table format - headers and values, no totals or otherwise extra content:
77
+ To read a file where the data is in table format.
78
+
79
+ * headers and rows only - no concept of sums/totals or any other content is provided for.
80
+ * columns which do not contain a value in row 1 are ignored
81
+ * formatting is discarded, only the cell values are retained
78
82
 
79
83
  ```ruby
80
84
  Rxl.read_file_as_tables('path/to/file.xlsx')
data/lib/rxl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rxl
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
data/lib/worksheet.rb CHANGED
@@ -73,6 +73,7 @@ module Worksheet
73
73
  def self.hash_worksheet_to_hash_table(raw_hash)
74
74
  cells = Mitrush.deep_copy(raw_hash)
75
75
  columns = cells.keys.map { |key| key[/\D+/] }.uniq
76
+ columns.delete_if { |item| cells["#{item}1"][:value].nil? }
76
77
  row_nums = cells.keys.map { |key| key[/\d+/].to_i }.uniq[1..-1].sort
77
78
  row_nums.map do |row_number|
78
79
  columns.each_with_object({}) do |column_letter, h|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rxl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian McWilliams
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-02 00:00:00.000000000 Z
11
+ date: 2019-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler