robust_excel_ole 1.11 → 1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog +11 -0
- data/README.rdoc +20 -8
- data/docs/README_open.rdoc +1 -0
- data/docs/README_ranges.rdoc +5 -11
- data/examples/{introducing_examples/example_introducing.rb → introductory_examples/example_introductory.rb} +10 -2
- data/examples/{introducing_examples → introductory_examples}/example_open.rb +18 -17
- data/examples/{introducing_examples → introductory_examples}/example_range.rb +29 -16
- data/examples/modifying_sheets/example_access_sheets_and_cells.rb +8 -7
- data/examples/modifying_sheets/example_add_names.rb +4 -8
- data/examples/modifying_sheets/example_adding_sheets.rb +7 -6
- data/examples/modifying_sheets/example_concating.rb +2 -2
- data/examples/modifying_sheets/example_copying.rb +3 -3
- data/examples/modifying_sheets/example_expanding.rb +2 -2
- data/examples/modifying_sheets/example_naming.rb +2 -2
- data/examples/modifying_sheets/example_ranges.rb +4 -4
- data/examples/modifying_sheets/example_saving.rb +3 -3
- data/examples/open_save_close/example_control_to_excel.rb +10 -11
- data/examples/open_save_close/example_default_excel.rb +13 -14
- data/examples/open_save_close/example_force_excel.rb +9 -10
- data/examples/open_save_close/example_if_obstructed_closeifsaved.rb +7 -7
- data/examples/open_save_close/example_if_obstructed_forget.rb +5 -5
- data/examples/open_save_close/example_if_obstructed_save.rb +7 -7
- data/examples/open_save_close/example_if_unsaved_accept.rb +13 -13
- data/examples/open_save_close/example_if_unsaved_forget.rb +9 -10
- data/examples/open_save_close/example_if_unsaved_forget_more.rb +9 -10
- data/examples/open_save_close/example_read_only.rb +6 -6
- data/examples/open_save_close/example_rename_cells.rb +4 -5
- data/examples/open_save_close/example_reuse.rb +6 -6
- data/examples/open_save_close/example_simple.rb +5 -5
- data/examples/open_save_close/example_unobtrusively.rb +4 -4
- data/lib/robust_excel_ole/address.rb +0 -4
- data/lib/robust_excel_ole/bookstore.rb +4 -28
- data/lib/robust_excel_ole/excel.rb +17 -22
- data/lib/robust_excel_ole/general.rb +11 -18
- data/lib/robust_excel_ole/range_owners.rb +17 -27
- data/lib/robust_excel_ole/reo_common.rb +7 -3
- data/lib/robust_excel_ole/version.rb +1 -1
- data/lib/robust_excel_ole/workbook.rb +178 -180
- data/lib/robust_excel_ole/worksheet.rb +7 -4
- data/robust_excel_ole.gemspec +6 -4
- data/spec/bookstore_spec.rb +38 -34
- data/spec/data/more_data/workbook.xls +0 -0
- data/spec/excel_spec.rb +89 -44
- data/spec/general_spec.rb +1 -0
- data/spec/range_spec.rb +7 -4
- data/spec/workbook_specs/workbook_close_spec.rb +2 -1
- data/spec/workbook_specs/workbook_misc_spec.rb +34 -18
- data/spec/workbook_specs/workbook_open_spec.rb +112 -71
- data/spec/workbook_specs/workbook_save_spec.rb +173 -5
- data/spec/workbook_specs/workbook_sheet_spec.rb +6 -42
- data/spec/workbook_specs/workbook_unobtr_spec.rb +9 -246
- data/spec/worksheet_spec.rb +21 -5
- metadata +12 -11
data/spec/worksheet_spec.rb
CHANGED
@@ -596,7 +596,7 @@ describe Worksheet do
|
|
596
596
|
it "should raise an error of coordinates are given instead of a defined name" do
|
597
597
|
expect {
|
598
598
|
@sheet1.namevalue_glob("A1")
|
599
|
-
}.to raise_error(NameNotFound, /name "A1" not in
|
599
|
+
}.to raise_error(NameNotFound, /name "A1" not in/)
|
600
600
|
end
|
601
601
|
|
602
602
|
it "should return default value for a range with empty contents" do
|
@@ -614,16 +614,24 @@ describe Worksheet do
|
|
614
614
|
it "should raise an error if name cannot be evaluated" do
|
615
615
|
expect{
|
616
616
|
@sheet1.set_namevalue_glob("foo", 1)
|
617
|
-
}.to raise_error(
|
617
|
+
}.to raise_error(RangeNotEvaluatable, /cannot assign value/)
|
618
618
|
end
|
619
619
|
|
620
|
-
it "should color the cell" do
|
620
|
+
it "should color the cell (deprecated)" do
|
621
621
|
@sheet1.set_namevalue_glob("new", "bar")
|
622
622
|
@book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == -4142
|
623
623
|
@sheet1.set_namevalue_glob("new", "bar", :color => 4)
|
624
624
|
@book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == 4
|
625
625
|
end
|
626
626
|
|
627
|
+
it "should color the cell" do
|
628
|
+
@sheet1.set_namevalue_glob("new", "bar")
|
629
|
+
@book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == -4142
|
630
|
+
@book1.color_if_modified = 4
|
631
|
+
@sheet1.set_namevalue_glob("new", "bar")
|
632
|
+
@book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == 4
|
633
|
+
end
|
634
|
+
|
627
635
|
end
|
628
636
|
|
629
637
|
describe "namevalue, set_namevalue" do
|
@@ -684,7 +692,7 @@ describe Worksheet do
|
|
684
692
|
it "should raise an error if name cannot be evaluated" do
|
685
693
|
expect{
|
686
694
|
@sheet1.set_namevalue_glob("foo", 1)
|
687
|
-
}.to raise_error(
|
695
|
+
}.to raise_error(RangeNotEvaluatable, /cannot assign value/)
|
688
696
|
end
|
689
697
|
|
690
698
|
it "should raise an error if name not defined and default value is not provided" do
|
@@ -702,13 +710,21 @@ describe Worksheet do
|
|
702
710
|
@sheet1.namevalue_glob("empty", :default => 1).should be_nil
|
703
711
|
end
|
704
712
|
|
705
|
-
it "should color the cell" do
|
713
|
+
it "should color the cell (depracated)" do
|
706
714
|
@sheet1.set_namevalue("new", "bar")
|
707
715
|
@book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == -4142
|
708
716
|
@sheet1.set_namevalue("new", "bar", :color => 4)
|
709
717
|
@book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == 4
|
710
718
|
end
|
711
719
|
|
720
|
+
it "should color the cell" do
|
721
|
+
@sheet1.set_namevalue("new", "bar")
|
722
|
+
@book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == -4142
|
723
|
+
@book1.color_if_modified = 4
|
724
|
+
@sheet1.set_namevalue("new", "bar")
|
725
|
+
@book1.Names.Item("new").RefersToRange.Interior.ColorIndex.should == 4
|
726
|
+
end
|
727
|
+
|
712
728
|
end
|
713
729
|
|
714
730
|
describe "add_name, delete_name, rename_range" 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.12'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- traths
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -24,12 +24,13 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 2.6.0
|
27
|
-
description:
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
27
|
+
description: "RobustExcelOle helps controlling Excel. \n It is designed
|
28
|
+
to manage simultaneously running\n Excel instances, even with
|
29
|
+
simultanously happening user interactions.\n This obviously includes
|
30
|
+
standard tasks like reading and writing Excel workbooks.\n RobustExcelOle
|
31
|
+
deals with various cases of Excel (and user) behaviour,\n supplies
|
32
|
+
workarounds for some Excel bugs, and supports referenced libraries.\n It
|
33
|
+
runs on Windows and uses the win32ole library."
|
33
34
|
email:
|
34
35
|
- Thomas.Raths@gmx.net
|
35
36
|
executables: []
|
@@ -53,9 +54,9 @@ files:
|
|
53
54
|
- docs/README_ranges.rdoc
|
54
55
|
- docs/README_save_close.rdoc
|
55
56
|
- docs/README_sheet.rdoc
|
56
|
-
- examples/
|
57
|
-
- examples/
|
58
|
-
- examples/
|
57
|
+
- examples/introductory_examples/example_introductory.rb
|
58
|
+
- examples/introductory_examples/example_open.rb
|
59
|
+
- examples/introductory_examples/example_range.rb
|
59
60
|
- examples/modifying_sheets/example_access_sheets_and_cells.rb
|
60
61
|
- examples/modifying_sheets/example_add_names.rb
|
61
62
|
- examples/modifying_sheets/example_adding_sheets.rb
|