excel_to_code 0.3.12 → 0.3.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ebf3386f4d5efa91662f276d92a69aa8c417b3c
4
- data.tar.gz: 555a3e29d093d245839f48220315ad2169f63e96
3
+ metadata.gz: 8913cb43d387cfb52e6a6ad5ef5a8554758164ef
4
+ data.tar.gz: c305a04d9de3fd7b1f6c3608787820db3ec47601
5
5
  SHA512:
6
- metadata.gz: 8f8033aa4e8873a5e9b21450f69559de94fbf67c1a717dc9758faebdb753238d551c609e4ff77013fbc7c65879b46e1689ace91bf30b11082a187fde9402925a
7
- data.tar.gz: ef3a5b2e3a1a357825ad45de11aaf3706b26a8169219d45a3cdf1fc6a4b3dfe27a64be281d820ce1ea784db8fe2c61e49543e430d695e4c95c8a325811492eb4
6
+ metadata.gz: 76e98bfafc8a0ee0832b4e735c8b9eb49658e36dcc7f2d4063bc1e945ed55e45e6e8422ee20659b513ce59c881ff60c3d11159dabb38c052162a48774187fb4a
7
+ data.tar.gz: a43591e548cd6ee59e1ef907a109fa77151bbd017f8027f1cd2351882e641f8fca05461b5070a7a6e7534ce30c031b380f8fc8f25e2a460f837b341b114b1826
@@ -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
- return true if must_keep_in_sheet == :all
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
@@ -1,5 +1,5 @@
1
1
  class ExcelToCode
2
- def self.version() "0.3.12" end
2
+ def self.version() "0.3.13" end
3
3
  end
4
4
 
5
5
  require_relative 'commands'
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.12
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-27 00:00:00.000000000 Z
11
+ date: 2015-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubypeg