excel_to_code 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/src/excel_to_code.rb +1 -1
- data/src/rewrite/caching_formula_parser.rb +6 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b31b150912c743cfb3ca5fa00d9045eb7e127f1
|
4
|
+
data.tar.gz: 70c47e8edebfa98d247707dc341325aab44d8e11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe48eabe07ddfd1961d6baeafa0944a6f2dbf8ec2c42cc6a78374d3786d9fbd7240b2b7f21149a3fe870db8707cf1969dbeb32cde1252a8cdced7455536e20e0
|
7
|
+
data.tar.gz: 926221e23b72ed369390ea72d7c257a7fb02c643555c9f78560c6166fcccccb74b9d5c7c024e6aeebcd5bc8fb299991f23d97cb763e81253021e999b0f503950
|
data/src/excel_to_code.rb
CHANGED
@@ -14,14 +14,16 @@ class ExternalReferenceException < ExcelToCodeException
|
|
14
14
|
def message
|
15
15
|
<<-END
|
16
16
|
|
17
|
+
|
17
18
|
Sorry, ExcelToCode can't handle external references
|
18
19
|
|
19
|
-
It found one
|
20
|
-
The
|
20
|
+
It found one in #{ref.join("!")}
|
21
|
+
The formula was #{formula_text}
|
21
22
|
Which was parsed to #{full_ast}
|
22
23
|
Which seemed to have an external reference at #{reference_ast}
|
24
|
+
Note, the [0], [1], [2] ... are the way Excel stores the names of the external files.
|
23
25
|
|
24
|
-
Please remove the external reference from the Excel and try again
|
26
|
+
Please remove the external reference from the Excel and try again.
|
25
27
|
|
26
28
|
END
|
27
29
|
end
|
@@ -54,7 +56,7 @@ class CachingFormulaParser
|
|
54
56
|
def parse(text)
|
55
57
|
ast = Formula.parse(text)
|
56
58
|
@text = text # Kept in case of Exception below
|
57
|
-
@full_ast = ast # Kept in case of Exception below
|
59
|
+
@full_ast = ast.to_ast[1] # Kept in case of Exception below
|
58
60
|
if ast
|
59
61
|
map(ast.to_ast[1])
|
60
62
|
else
|