robust_excel_ole 1.23 → 1.28
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/Changelog +15 -0
- data/README.rdoc +22 -3
- data/bin/jreo +20 -1
- data/bin/reo +20 -1
- data/lib/robust_excel_ole.rb +2 -3
- data/lib/robust_excel_ole/base.rb +5 -0
- data/lib/robust_excel_ole/excel.rb +9 -9
- data/lib/robust_excel_ole/general.rb +103 -32
- data/lib/robust_excel_ole/version.rb +1 -1
- data/robust_excel_ole.gemspec +1 -1
- data/spec/general_spec.rb +27 -0
- metadata +4 -7
- data/jreo.bat +0 -3
- data/lib/reo_console.rb +0 -21
- data/reo.bat +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07c975ffbb28abda163753fff25e0949c0aafeddefa24d5d840993a8fc8fea02
|
4
|
+
data.tar.gz: 5ac54be9b6ecfcede48a9d9bf0dc67f0ebe86528d41a44e032b29a244a9e3e0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a324a7ab9da6e19e91f0da418e61c19c5cc52cf941763b3f4fac781d03e84f554d4dfe52839f41c6df225dca92157ef644700aa6ed2b3b24d4e3998952ad0872
|
7
|
+
data.tar.gz: b856effb28b64db2d3b22496f229e8b76c24806264b514772424afdbcdb71abb2f0106274bedc994f5145695d8e8b231eeb568f2c82dc7acc6a1762aa459df3d
|
data/Changelog
CHANGED
@@ -1,6 +1,21 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## [1.28] 2020-23-10
|
5
|
+
|
6
|
+
## [1.27] 2020-16-10
|
7
|
+
|
8
|
+
## [1.26] 2020-09-10
|
9
|
+
|
10
|
+
### Added
|
11
|
+
- General#change_current_binding
|
12
|
+
|
13
|
+
## [1.25] 2020-10-09]
|
14
|
+
|
15
|
+
## [1.24] 2020-25-09
|
16
|
+
|
17
|
+
## [1.23] 2020-02-09
|
18
|
+
|
4
19
|
## [1.22] 2020-10-08
|
5
20
|
|
6
21
|
### Added
|
data/README.rdoc
CHANGED
@@ -64,7 +64,7 @@ If you want to start the console under jruby, and if you don't want to use a ver
|
|
64
64
|
|
65
65
|
jreo
|
66
66
|
|
67
|
-
The call of the console will include RobustExcelOle for you. The consoles require the ruby gem 'pry'
|
67
|
+
The call of the console will include RobustExcelOle for you. The consoles require the ruby gem 'pry' and 'pry-bond' to enable the ruby shell 'pry' with filename and string completion.
|
68
68
|
|
69
69
|
The following examples can be used for both scripts and console. If you have started the console in the gem path, you can just put these examples.
|
70
70
|
|
@@ -318,9 +318,28 @@ and set another value to that range.
|
|
318
318
|
For more details about reading and writing contents of cells and ranges see {README_ranges}[https://github.com/Thomas008/robust_excel_ole/blob/master/docs/README_ranges.rdoc]
|
319
319
|
|
320
320
|
|
321
|
-
=== More
|
321
|
+
=== More features
|
322
322
|
|
323
|
-
|
323
|
+
1. The method +General.change_current_binding+ allows to change the value of self within the current binding, while preserving the local variables, without starting another repl. Assume, +object+ shall be the self, then you would put
|
324
|
+
|
325
|
+
General.change_current_binding(object)
|
326
|
+
|
327
|
+
Without this method, the ruby shell 'pry' allows to change the value of 'self' in the console as well, e.g.
|
328
|
+
|
329
|
+
object.pry
|
330
|
+
|
331
|
+
or
|
332
|
+
|
333
|
+
cd object
|
334
|
+
|
335
|
+
However, this command also starts another pry repl (with another binding). Moreover, local variables in the previous binding are forgotten.
|
336
|
+
|
337
|
+
|
338
|
+
2. The class Win32Ole is being extended such that RobustExcelOle methods can be applied to Win32Ole objects. As mentioned above, the RobustExcelOle objects are wrapper of corresponding WIN32OLE objects. With help of +update_to_reo+ the RobustExcelOle objects and their wrapped Win32Ole objects are interchangeable. One example would be
|
339
|
+
|
340
|
+
range.ole_range.copy([4,3])
|
341
|
+
|
342
|
+
Likewise it is possible to convert ("type-lift") Win32Ole objects into the corresponding RobustExcelOle object, using General.to_reo.
|
324
343
|
|
325
344
|
range = sheet.Names.Item("firstcell").to_reo
|
326
345
|
|
data/bin/jreo
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# -*- jruby -*-
|
3
3
|
|
4
4
|
require 'pry'
|
5
|
-
|
5
|
+
require_relative '../lib/robust_excel_ole'
|
6
6
|
|
7
7
|
include REO
|
8
8
|
include General
|
@@ -15,10 +15,29 @@ Pry.config.prompt_name = "REO "
|
|
15
15
|
#Pry.config.history_save = true
|
16
16
|
#Pry.editor = 'notepad' # 'subl', 'vi'
|
17
17
|
|
18
|
+
prompt_proc1 = proc { |target_self, nest_level, pry|
|
19
|
+
"[#{pry.input_ring.count}] #{pry.config.prompt_name}(#{Pry.view_clip(target_self)})#{":#{nest_level}" unless nest_level.zero?}> "
|
20
|
+
}
|
21
|
+
|
22
|
+
prompt_proc2 = proc { |target_self, nest_level, pry|
|
23
|
+
"[#{pry.input_ring.count}] #{pry.config.prompt_name}(#{Pry.view_clip(target_self.inspect.gsub(/\"/, ''))})})#{":#{nest_level}" unless nest_level.zero?}* "
|
24
|
+
}
|
25
|
+
|
26
|
+
Pry.config.prompt = if RUBY_PLATFORM =~ /java/
|
27
|
+
[prompt_proc1, prompt_proc2]
|
28
|
+
else
|
29
|
+
Pry::Prompt.new(
|
30
|
+
"REO",
|
31
|
+
"The RobustExcelOle Prompt. Besides the standard information it puts the current object",
|
32
|
+
[prompt_proc1, prompt_proc2]
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
18
36
|
hooks = Pry::Hooks.new
|
19
37
|
|
20
38
|
hooks.add_hook :when_started, :hook12 do
|
21
39
|
puts 'REO console started'
|
22
40
|
puts
|
23
41
|
end
|
42
|
+
|
24
43
|
Pry.start(nil, hooks: hooks)
|
data/bin/reo
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# -*- ruby -*-
|
3
3
|
|
4
4
|
require 'pry'
|
5
|
-
|
5
|
+
require_relative '../lib/robust_excel_ole'
|
6
6
|
|
7
7
|
include REO
|
8
8
|
include General
|
@@ -15,10 +15,29 @@ Pry.config.prompt_name = "REO "
|
|
15
15
|
#Pry.config.history_save = true
|
16
16
|
#Pry.editor = 'notepad' # 'subl', 'vi'
|
17
17
|
|
18
|
+
prompt_proc1 = proc { |target_self, nest_level, pry|
|
19
|
+
"[#{pry.input_ring.count}] #{pry.config.prompt_name}(#{Pry.view_clip(target_self)})#{":#{nest_level}" unless nest_level.zero?}> "
|
20
|
+
}
|
21
|
+
|
22
|
+
prompt_proc2 = proc { |target_self, nest_level, pry|
|
23
|
+
"[#{pry.input_ring.count}] #{pry.config.prompt_name}(#{Pry.view_clip(target_self.inspect.gsub(/\"/, ''))})})#{":#{nest_level}" unless nest_level.zero?}* "
|
24
|
+
}
|
25
|
+
|
26
|
+
Pry.config.prompt = if RUBY_PLATFORM =~ /java/
|
27
|
+
[prompt_proc1, prompt_proc2]
|
28
|
+
else
|
29
|
+
Pry::Prompt.new(
|
30
|
+
"REO",
|
31
|
+
"The RobustExcelOle Prompt. Besides the standard information it puts the current object",
|
32
|
+
[prompt_proc1, prompt_proc2]
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
18
36
|
hooks = Pry::Hooks.new
|
19
37
|
|
20
38
|
hooks.add_hook :when_started, :hook12 do
|
21
39
|
puts 'REO console started'
|
22
40
|
puts
|
23
41
|
end
|
42
|
+
|
24
43
|
Pry.start(nil, hooks: hooks)
|
data/lib/robust_excel_ole.rb
CHANGED
@@ -3,8 +3,8 @@ if RUBY_PLATFORM =~ /java/
|
|
3
3
|
else
|
4
4
|
require 'win32ole'
|
5
5
|
end
|
6
|
-
require File.join(File.dirname(__FILE__), 'robust_excel_ole/base')
|
7
6
|
require File.join(File.dirname(__FILE__), 'robust_excel_ole/general')
|
7
|
+
require File.join(File.dirname(__FILE__), 'robust_excel_ole/base')
|
8
8
|
require File.join(File.dirname(__FILE__), 'robust_excel_ole/vba_objects')
|
9
9
|
require File.join(File.dirname(__FILE__), 'robust_excel_ole/range_owners')
|
10
10
|
require File.join(File.dirname(__FILE__), 'robust_excel_ole/address_tool')
|
@@ -18,5 +18,4 @@ require File.join(File.dirname(__FILE__), 'robust_excel_ole/list_object')
|
|
18
18
|
require File.join(File.dirname(__FILE__), 'robust_excel_ole/cygwin') if RUBY_PLATFORM =~ /cygwin/
|
19
19
|
require File.join(File.dirname(__FILE__), 'robust_excel_ole/version')
|
20
20
|
|
21
|
-
|
22
|
-
include General
|
21
|
+
General.init_reo_for_win32ole
|
@@ -76,7 +76,7 @@ module RobustExcelOle
|
|
76
76
|
end
|
77
77
|
connected = (not ole_xl.nil?) && win32ole_excel.nil?
|
78
78
|
ole_xl ||= WIN32OLE.new('Excel.Application')
|
79
|
-
hwnd = ole_xl.
|
79
|
+
hwnd = ole_xl.Hwnd
|
80
80
|
stored = hwnd2excel(hwnd)
|
81
81
|
if stored && stored.alive?
|
82
82
|
result = stored
|
@@ -297,7 +297,7 @@ module RobustExcelOle
|
|
297
297
|
finishing_living_excel = alive?
|
298
298
|
if finishing_living_excel
|
299
299
|
hwnd = (begin
|
300
|
-
@ole_excel.
|
300
|
+
@ole_excel.Hwnd
|
301
301
|
rescue
|
302
302
|
nil
|
303
303
|
end)
|
@@ -370,7 +370,7 @@ module RobustExcelOle
|
|
370
370
|
number = 0
|
371
371
|
WIN32OLE.connect('winmgmts:\\\\.').InstancesOf('win32_process').each do |p|
|
372
372
|
begin
|
373
|
-
if p.
|
373
|
+
if p.Name == 'EXCEL.EXE'
|
374
374
|
Process.kill('KILL', p.processid)
|
375
375
|
number += 1
|
376
376
|
end
|
@@ -384,7 +384,7 @@ module RobustExcelOle
|
|
384
384
|
|
385
385
|
def self.excels_number
|
386
386
|
processes = WIN32OLE.connect('winmgmts:\\\\.').InstancesOf('win32_process')
|
387
|
-
processes.select { |p| p.
|
387
|
+
processes.select { |p| p.Name == 'EXCEL.EXE' }.size
|
388
388
|
end
|
389
389
|
|
390
390
|
def self.known_excels_number
|
@@ -417,7 +417,7 @@ module RobustExcelOle
|
|
417
417
|
result.Visible # send any method, just to see if it responds
|
418
418
|
rescue
|
419
419
|
trace 'dead excel ' + (begin
|
420
|
-
"Window-handle = #{result.
|
420
|
+
"Window-handle = #{result.Hwnd}"
|
421
421
|
rescue
|
422
422
|
'without window handle'
|
423
423
|
end)
|
@@ -471,13 +471,13 @@ module RobustExcelOle
|
|
471
471
|
pid2excel[pid] = excel
|
472
472
|
end
|
473
473
|
processes = WIN32OLE.connect('winmgmts:\\\\.').InstancesOf('win32_process')
|
474
|
-
processes.select { |p| Excel.new(pid2excel[p.
|
474
|
+
processes.select { |p| Excel.new(pid2excel[p.ProcessId]) if p.Name == 'EXCEL.EXE' && pid2excel.include?(p.ProcessId) }
|
475
475
|
result = []
|
476
476
|
processes.each do |p|
|
477
|
-
next unless p.
|
477
|
+
next unless p.Name == 'EXCEL.EXE'
|
478
478
|
|
479
|
-
if pid2excel.include?(p.
|
480
|
-
excel = pid2excel[p.
|
479
|
+
if pid2excel.include?(p.ProcessId)
|
480
|
+
excel = pid2excel[p.ProcessId]
|
481
481
|
result << excel
|
482
482
|
end
|
483
483
|
# how to connect to an (interactively opened) Excel instance and get a WIN32OLE object?
|
@@ -3,14 +3,14 @@
|
|
3
3
|
module General
|
4
4
|
|
5
5
|
IS_JRUBY_PLATFORM = (RUBY_PLATFORM =~ /java/)
|
6
|
-
::EXPANDPATH_JRUBY_BUG
|
7
|
-
::CONNECT_JRUBY_BUG
|
8
|
-
::COPYSHEETS_JRUBY_BUG
|
9
|
-
::ERRORMESSAGE_JRUBY_BUG
|
10
|
-
::CONNECT_EXCEL_JRUBY_BUG
|
11
|
-
::RANGES_JRUBY_BUG
|
12
|
-
|
13
|
-
@private
|
6
|
+
::EXPANDPATH_JRUBY_BUG = IS_JRUBY_PLATFORM && true
|
7
|
+
::CONNECT_JRUBY_BUG = IS_JRUBY_PLATFORM && true
|
8
|
+
::COPYSHEETS_JRUBY_BUG = IS_JRUBY_PLATFORM && true
|
9
|
+
::ERRORMESSAGE_JRUBY_BUG = IS_JRUBY_PLATFORM && true
|
10
|
+
::CONNECT_EXCEL_JRUBY_BUG = IS_JRUBY_PLATFORM && true
|
11
|
+
::RANGES_JRUBY_BUG = IS_JRUBY_PLATFORM && true
|
12
|
+
|
13
|
+
# @private
|
14
14
|
NetworkDrive = Struct.new(:drive_letter, :network_name) do
|
15
15
|
|
16
16
|
def self.get_all(drives)
|
@@ -24,7 +24,7 @@ module General
|
|
24
24
|
|
25
25
|
end
|
26
26
|
|
27
|
-
@private
|
27
|
+
# @private
|
28
28
|
def hostnameshare2networkpath(filename)
|
29
29
|
return filename unless filename[0,2] == "//"
|
30
30
|
network = WIN32OLE.new('WScript.Network')
|
@@ -44,7 +44,7 @@ module General
|
|
44
44
|
file[0,2] = './' if ::EXPANDPATH_JRUBY_BUG && file =~ /[A-Z]:[^\/]/
|
45
45
|
file = File.expand_path(file)
|
46
46
|
file = RobustExcelOle::Cygwin.cygpath('-w', file) if RUBY_PLATFORM =~ /cygwin/
|
47
|
-
WIN32OLE.new('Scripting.FileSystemObject').GetAbsolutePathName(file)
|
47
|
+
WIN32OLE.new('Scripting.FileSystemObject').GetAbsolutePathName(file) #.tr('/','\\')
|
48
48
|
end
|
49
49
|
|
50
50
|
# @private
|
@@ -64,8 +64,99 @@ module General
|
|
64
64
|
path
|
65
65
|
end
|
66
66
|
|
67
|
-
|
67
|
+
def change_current_binding(current_object)
|
68
|
+
Pry.change_current_binding(current_object)
|
69
|
+
end
|
70
|
+
|
71
|
+
def class2method
|
72
|
+
[{RobustExcelOle::Excel => :Hwnd},
|
73
|
+
{RobustExcelOle::Workbook => :FullName},
|
74
|
+
{RobustExcelOle::Worksheet => :UsedRange},
|
75
|
+
{RobustExcelOle::Range => :Row},
|
76
|
+
{RobustExcelOle::ListObject => :ListRows}]
|
77
|
+
end
|
78
|
+
|
79
|
+
|
80
|
+
# enable RobustExcelOle methods to Win32Ole objects
|
81
|
+
def init_reo_for_win32ole
|
82
|
+
exclude_list = [:each, :inspect]
|
83
|
+
class2method.each do |element|
|
84
|
+
classname = element.first.first
|
85
|
+
method = element.first.last
|
86
|
+
classname.instance_methods(false).each do |inst_method|
|
87
|
+
if !exclude_list.include?(inst_method)
|
88
|
+
WIN32OLE.send(:define_method, inst_method) do |*args, &blk|
|
89
|
+
self.to_reo.send(inst_method, *args, &blk)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
nil
|
95
|
+
end
|
96
|
+
|
97
|
+
module_function :absolute_path, :canonize, :normalize, :change_current_binding, :class2method, :init_reo_for_win32ole
|
98
|
+
|
99
|
+
end
|
100
|
+
|
101
|
+
# @private
|
102
|
+
class Pry
|
103
|
+
|
104
|
+
# change the current binding such that self is the current object in the pry-instance,
|
105
|
+
# preserve the local variables
|
106
|
+
|
107
|
+
class << self
|
108
|
+
attr_accessor :pry_instance
|
109
|
+
end
|
110
|
+
|
111
|
+
def self.change_current_binding(current_object)
|
112
|
+
pry_instance = self.pry_instance
|
113
|
+
old_binding = pry_instance.binding_stack.pop
|
114
|
+
pry_instance.push_binding(current_object.__binding__)
|
115
|
+
exclude_vars = [:__, :_, :_dir, :_dir_, :_file, :_file_, :_in_, :_out_, :_ex, :_ex_, :pry_instance]
|
116
|
+
old_binding.local_variables.each do |var|
|
117
|
+
pry_instance.add_sticky_local(var) {old_binding.local_variable_get(var)} unless exclude_vars.include?(var)
|
118
|
+
end
|
119
|
+
self.pry_instance = pry_instance
|
120
|
+
nil
|
121
|
+
end
|
68
122
|
|
123
|
+
def push_initial_binding(target = nil)
|
124
|
+
# memorize the current pry instance
|
125
|
+
self.class.pry_instance = self
|
126
|
+
push_binding(target || Pry.toplevel_binding)
|
127
|
+
end
|
128
|
+
|
129
|
+
class REPL
|
130
|
+
|
131
|
+
def read
|
132
|
+
@indent.reset if pry.eval_string.empty?
|
133
|
+
current_prompt = pry.select_prompt
|
134
|
+
indentation = pry.config.auto_indent ? @indent.current_prefix : ''
|
135
|
+
val = read_line("#{current_prompt}#{indentation}")
|
136
|
+
# Return nil for EOF, :no_more_input for error, or :control_c for <Ctrl-C>
|
137
|
+
return val unless val.is_a?(String)
|
138
|
+
if pry.config.auto_indent
|
139
|
+
original_val = "#{indentation}#{val}"
|
140
|
+
indented_val = @indent.indent(val)
|
141
|
+
|
142
|
+
if output.tty? &&
|
143
|
+
pry.config.correct_indent &&
|
144
|
+
Pry::Helpers::BaseHelpers.use_ansi_codes?
|
145
|
+
# avoid repeating read line
|
146
|
+
|
147
|
+
#output.print @indent.correct_indentation(
|
148
|
+
# current_prompt,
|
149
|
+
# indented_val,
|
150
|
+
# calculate_overhang(current_prompt, original_val, indented_val)
|
151
|
+
#)
|
152
|
+
output.flush
|
153
|
+
end
|
154
|
+
else
|
155
|
+
indented_val = val
|
156
|
+
end
|
157
|
+
indented_val
|
158
|
+
end
|
159
|
+
end
|
69
160
|
end
|
70
161
|
|
71
162
|
# @private
|
@@ -118,14 +209,7 @@ class WIN32OLE
|
|
118
209
|
|
119
210
|
# type-lifting WIN32OLE objects to RobustExcelOle objects
|
120
211
|
def to_reo
|
121
|
-
class2method
|
122
|
-
{Excel => :Hwnd},
|
123
|
-
{Workbook => :FullName},
|
124
|
-
{Worksheet => :UsedRange},
|
125
|
-
{RobustExcelOle::Range => :Row},
|
126
|
-
{ListObject => :ListRows}
|
127
|
-
]
|
128
|
-
class2method.each do |element|
|
212
|
+
General.class2method.each do |element|
|
129
213
|
classname = element.first.first
|
130
214
|
method = element.first.last
|
131
215
|
begin
|
@@ -142,16 +226,6 @@ class WIN32OLE
|
|
142
226
|
raise TypeREOError, "given object cannot be type-lifted to a RobustExcelOle object"
|
143
227
|
end
|
144
228
|
|
145
|
-
alias method_missing_before_implicit_typelift method_missing
|
146
|
-
def xx_method_missing(name, *args, &blk)
|
147
|
-
begin
|
148
|
-
reo_obj = self.to_reo
|
149
|
-
rescue
|
150
|
-
puts "$!.message: #{$!.message}"
|
151
|
-
method_missing_before_implicit_typelift(name, *args, &blk)
|
152
|
-
end
|
153
|
-
reo_obj.send(name, *args, &blk)
|
154
|
-
end
|
155
229
|
end
|
156
230
|
|
157
231
|
# @private
|
@@ -276,7 +350,4 @@ module MethodHelpers
|
|
276
350
|
super
|
277
351
|
end
|
278
352
|
end
|
279
|
-
|
280
353
|
end
|
281
|
-
|
282
|
-
REO = RobustExcelOle
|
data/robust_excel_ole.gemspec
CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
35
35
|
s.require_paths = ["lib"]
|
36
36
|
s.add_runtime_dependency "pry", '>= 0.12.1'
|
37
|
-
s.add_runtime_dependency "pry-bond", '>=0.
|
37
|
+
s.add_runtime_dependency "pry-bond", '>=0.0.1'
|
38
38
|
s.add_development_dependency "rspec", '>= 2.6.0'
|
39
39
|
s.required_ruby_version = '>= 2.1'
|
40
40
|
end
|
data/spec/general_spec.rb
CHANGED
@@ -96,6 +96,33 @@ module RobustExcelOle
|
|
96
96
|
|
97
97
|
end
|
98
98
|
|
99
|
+
describe "General.init_reo_for_win32ole" do
|
100
|
+
|
101
|
+
before do
|
102
|
+
@book1 = Workbook.open(@simple_file, :visible => true)
|
103
|
+
end
|
104
|
+
|
105
|
+
it "should apply reo-methods to win32ole objects" do
|
106
|
+
ole_book1 = @book1.ole_workbook
|
107
|
+
sheet1 = ole_book1.sheet(1)
|
108
|
+
sheet1.should be_a Worksheet
|
109
|
+
sheet1.name.should == "Sheet1"
|
110
|
+
ole_sheet1 = sheet1.ole_worksheet
|
111
|
+
range1 = ole_sheet1.range([1..2,3..4])
|
112
|
+
range1.should be_a RobustExcelOle::Range
|
113
|
+
range1.value.should == [["sheet1",nil],["foobaaa",nil]]
|
114
|
+
ole_range1 = range1.ole_range
|
115
|
+
ole_range1.copy([6,6])
|
116
|
+
range2 = sheet1.range([6..7,6..7])
|
117
|
+
range2.value.should == [["sheet1",nil],["foobaaa",nil]]
|
118
|
+
excel1 = @book1.excel
|
119
|
+
ole_excel1 = excel1.ole_excel
|
120
|
+
ole_excel1.close(:if_unsaved => :forget)
|
121
|
+
Excel.kill_all
|
122
|
+
end
|
123
|
+
|
124
|
+
end
|
125
|
+
|
99
126
|
describe "methods, own_methods, respond_to?" do
|
100
127
|
|
101
128
|
before do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: robust_excel_ole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.28'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- traths
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.0.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.0.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,8 +126,6 @@ files:
|
|
126
126
|
- examples/open_save_close/example_reuse.rb
|
127
127
|
- examples/open_save_close/example_simple.rb
|
128
128
|
- examples/open_save_close/example_unobtrusively.rb
|
129
|
-
- jreo.bat
|
130
|
-
- lib/reo_console.rb
|
131
129
|
- lib/robust_excel_ole.rb
|
132
130
|
- lib/robust_excel_ole/address_tool.rb
|
133
131
|
- lib/robust_excel_ole/base.rb
|
@@ -149,7 +147,6 @@ files:
|
|
149
147
|
- lib/robust_excel_ole/workbook.rb
|
150
148
|
- lib/robust_excel_ole/worksheet.rb
|
151
149
|
- lib/spec_helper.rb
|
152
|
-
- reo.bat
|
153
150
|
- robust_excel_ole.gemspec
|
154
151
|
- spec/address_tool_spec.rb
|
155
152
|
- spec/base_spec.rb
|
data/jreo.bat
DELETED
data/lib/reo_console.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'pry'
|
2
|
-
require '../robust_excel_ole/lib/robust_excel_ole'
|
3
|
-
|
4
|
-
include REO
|
5
|
-
include General
|
6
|
-
|
7
|
-
# some pry configuration
|
8
|
-
Pry.config.windows_console_warning = false
|
9
|
-
Pry.config.color = false
|
10
|
-
Pry.config.prompt_name = "REO "
|
11
|
-
|
12
|
-
#Pry.config.history_save = true
|
13
|
-
#Pry.editor = 'notepad' # 'subl', 'vi'
|
14
|
-
|
15
|
-
hooks = Pry::Hooks.new
|
16
|
-
|
17
|
-
hooks.add_hook :when_started, :hook12 do
|
18
|
-
puts 'REO console started'
|
19
|
-
puts
|
20
|
-
end
|
21
|
-
Pry.start(nil, hooks: hooks)
|
data/reo.bat
DELETED