excel_to_code 0.3.12 → 0.3.13
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 +4 -4
- data/src/commands/excel_to_x.rb +5 -1
- data/src/excel/excel_functions/power.rb +3 -2
- data/src/excel_to_code.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8913cb43d387cfb52e6a6ad5ef5a8554758164ef
|
4
|
+
data.tar.gz: c305a04d9de3fd7b1f6c3608787820db3ec47601
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76e98bfafc8a0ee0832b4e735c8b9eb49658e36dcc7f2d4063bc1e945ed55e45e6e8422ee20659b513ce59c881ff60c3d11159dabb38c052162a48774187fb4a
|
7
|
+
data.tar.gz: a43591e548cd6ee59e1ef907a109fa77151bbd017f8027f1cd2351882e641f8fca05461b5070a7a6e7534ce30c031b380f8fc8f25e2a460f837b341b114b1826
|
data/src/commands/excel_to_x.rb
CHANGED
@@ -956,7 +956,11 @@ class ExcelToX
|
|
956
956
|
def must_keep?(ref)
|
957
957
|
must_keep_in_sheet = @cells_that_can_be_set_at_runtime[ref.first]
|
958
958
|
return false unless must_keep_in_sheet
|
959
|
-
|
959
|
+
if must_keep_in_sheet == :all
|
960
|
+
# Only keep cells that actually exist
|
961
|
+
return true if @values[ref]
|
962
|
+
return false
|
963
|
+
end
|
960
964
|
must_keep_in_sheet.include?(ref.last)
|
961
965
|
end
|
962
966
|
|
@@ -4,13 +4,14 @@ require_relative 'apply_to_range'
|
|
4
4
|
module ExcelFunctions
|
5
5
|
|
6
6
|
def power(a,b)
|
7
|
-
# return apply_to_range(a,b) { |a,b| power(a,b) } if a.is_a?(Array) || b.is_a?(Array)
|
8
|
-
|
9
7
|
a = number_argument(a)
|
10
8
|
b = number_argument(b)
|
11
9
|
|
12
10
|
return a if a.is_a?(Symbol)
|
13
11
|
return b if b.is_a?(Symbol)
|
12
|
+
|
13
|
+
return 1 if b ==0 # Special case so can do the following negative number check
|
14
|
+
return :num if a < 1 && b < 1
|
14
15
|
|
15
16
|
a**b
|
16
17
|
end
|
data/src/excel_to_code.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: excel_to_code
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Counsell, Green on Black Ltd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02
|
11
|
+
date: 2015-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubypeg
|