write_xlsx 0.60.0 → 0.61.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +11 -1
- data/examples/hide_row_col.rb +33 -0
- data/html/en/doc_en.html +7765 -0
- data/html/index.html +16 -0
- data/html/style.css +433 -0
- data/lib/write_xlsx/chart.rb +20 -0
- data/lib/write_xlsx/package/button.rb +132 -0
- data/lib/write_xlsx/package/comments.rb +97 -1
- data/lib/write_xlsx/package/shared_strings.rb +2 -2
- data/lib/write_xlsx/package/vml.rb +9 -419
- data/lib/write_xlsx/utility.rb +138 -0
- data/lib/write_xlsx/version.rb +1 -1
- data/lib/write_xlsx/workbook.rb +2 -2
- data/lib/write_xlsx/worksheet.rb +178 -115
- data/test/drawing/test_write_row.rb +1 -1
- data/test/perl_output/hide_row_col.xlsx +0 -0
- data/test/perl_output/merge4.xlsx +0 -0
- data/test/perl_output/merge6.xlsx +0 -0
- data/test/regression/{test_vml04.rb → disabled_test_vml04.rb} +0 -0
- data/test/regression/test_chart_size01.rb +41 -0
- data/test/regression/test_chart_size02.rb +41 -0
- data/test/regression/test_chart_size03.rb +39 -0
- data/test/regression/test_default_row01.rb +26 -0
- data/test/regression/test_default_row02.rb +28 -0
- data/test/regression/test_default_row03.rb +28 -0
- data/test/regression/test_default_row04.rb +31 -0
- data/test/regression/xlsx_files/chart_size01.xlsx +0 -0
- data/test/regression/xlsx_files/default_row01.xlsx +0 -0
- data/test/regression/xlsx_files/default_row02.xlsx +0 -0
- data/test/regression/xlsx_files/default_row03.xlsx +0 -0
- data/test/regression/xlsx_files/default_row04.xlsx +0 -0
- data/test/test_example_match.rb +22 -0
- data/test/worksheet/test_write_methods.rb +0 -7
- metadata +35 -22
- data/test/package/vml/test_write_anchor.rb +0 -14
- data/test/package/vml/test_write_column.rb +0 -14
- data/test/package/vml/test_write_fill.rb +0 -22
- data/test/package/vml/test_write_move_with_cells.rb +0 -14
- data/test/package/vml/test_write_row.rb +0 -14
- data/test/package/vml/test_write_shadow.rb +0 -14
- data/test/package/vml/test_write_size_with_cells.rb +0 -14
- data/test/package/vml/test_write_textbox.rb +0 -14
- data/test/worksheet/test_write_hyperlinks.rb +0 -27
@@ -0,0 +1,41 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'helper'
|
3
|
+
|
4
|
+
class TestRegressionChartSize02 < Test::Unit::TestCase
|
5
|
+
def setup
|
6
|
+
setup_dir_var
|
7
|
+
end
|
8
|
+
|
9
|
+
def teardown
|
10
|
+
File.delete(@xlsx) if File.exist?(@xlsx)
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_chart_size02
|
14
|
+
@xlsx = 'chart_size01.xlsx'
|
15
|
+
workbook = WriteXLSX.new(@xlsx)
|
16
|
+
worksheet = workbook.add_worksheet
|
17
|
+
chart = workbook.add_chart(:type => 'column', :embedded => 1)
|
18
|
+
|
19
|
+
# For testing, copy the randomly generated axis ids in the target xlsx file.
|
20
|
+
chart.instance_variable_set(:@axis_ids, [61355904, 61365248])
|
21
|
+
|
22
|
+
data = [
|
23
|
+
[1, 2, 3, 4, 5],
|
24
|
+
[2, 4, 6, 8, 10],
|
25
|
+
[3, 6, 9, 12, 15]
|
26
|
+
]
|
27
|
+
|
28
|
+
worksheet.write('A1', data)
|
29
|
+
|
30
|
+
chart.add_series(:values => '=Sheet1!$A$1:$A$5')
|
31
|
+
chart.add_series(:values => '=Sheet1!$B$1:$B$5')
|
32
|
+
chart.add_series(:values => '=Sheet1!$C$1:$C$5')
|
33
|
+
|
34
|
+
chart.size(:x_scale => 1.066666666, :y_scale => 1.11111111)
|
35
|
+
|
36
|
+
worksheet.insert_chart('E9', chart)
|
37
|
+
|
38
|
+
workbook.close
|
39
|
+
compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'helper'
|
3
|
+
|
4
|
+
class TestRegressionChartSize03 < Test::Unit::TestCase
|
5
|
+
def setup
|
6
|
+
setup_dir_var
|
7
|
+
end
|
8
|
+
|
9
|
+
def teardown
|
10
|
+
File.delete(@xlsx) if File.exist?(@xlsx)
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_chart_size03
|
14
|
+
@xlsx = 'chart_size01.xlsx'
|
15
|
+
workbook = WriteXLSX.new(@xlsx)
|
16
|
+
worksheet = workbook.add_worksheet
|
17
|
+
chart = workbook.add_chart(:type => 'column', :embedded => 1)
|
18
|
+
|
19
|
+
# For testing, copy the randomly generated axis ids in the target xlsx file.
|
20
|
+
chart.instance_variable_set(:@axis_ids, [61355904, 61365248])
|
21
|
+
|
22
|
+
data = [
|
23
|
+
[1, 2, 3, 4, 5],
|
24
|
+
[2, 4, 6, 8, 10],
|
25
|
+
[3, 6, 9, 12, 15]
|
26
|
+
]
|
27
|
+
|
28
|
+
worksheet.write('A1', data)
|
29
|
+
|
30
|
+
chart.add_series(:values => '=Sheet1!$A$1:$A$5')
|
31
|
+
chart.add_series(:values => '=Sheet1!$B$1:$B$5')
|
32
|
+
chart.add_series(:values => '=Sheet1!$C$1:$C$5')
|
33
|
+
|
34
|
+
worksheet.insert_chart('E9', chart, 0, 0, 1.066666666, 1.11111111)
|
35
|
+
|
36
|
+
workbook.close
|
37
|
+
compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'helper'
|
3
|
+
|
4
|
+
class TestRegressionDefaultRow01 < Test::Unit::TestCase
|
5
|
+
def setup
|
6
|
+
setup_dir_var
|
7
|
+
end
|
8
|
+
|
9
|
+
def teardown
|
10
|
+
File.delete(@xlsx) if File.exist?(@xlsx)
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_default_row01
|
14
|
+
@xlsx = 'default_row01.xlsx'
|
15
|
+
workbook = WriteXLSX.new(@xlsx)
|
16
|
+
worksheet = workbook.add_worksheet
|
17
|
+
|
18
|
+
worksheet.set_default_row(24)
|
19
|
+
|
20
|
+
worksheet.write('A1', 'Foo')
|
21
|
+
worksheet.write('A10', 'Bar')
|
22
|
+
|
23
|
+
workbook.close
|
24
|
+
compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'helper'
|
3
|
+
|
4
|
+
class TestRegressionDefaultRow02 < Test::Unit::TestCase
|
5
|
+
def setup
|
6
|
+
setup_dir_var
|
7
|
+
end
|
8
|
+
|
9
|
+
def teardown
|
10
|
+
File.delete(@xlsx) if File.exist?(@xlsx)
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_default_row02
|
14
|
+
@xlsx = 'default_row02.xlsx'
|
15
|
+
workbook = WriteXLSX.new(@xlsx)
|
16
|
+
worksheet = workbook.add_worksheet
|
17
|
+
|
18
|
+
worksheet.set_default_row(nil, 1)
|
19
|
+
|
20
|
+
worksheet.write('A1', 'Foo')
|
21
|
+
worksheet.write('A10', 'Bar')
|
22
|
+
|
23
|
+
(1..8).each { |row| worksheet.set_row(row, 15) }
|
24
|
+
|
25
|
+
workbook.close
|
26
|
+
compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'helper'
|
3
|
+
|
4
|
+
class TestRegressionDefaultRow03 < Test::Unit::TestCase
|
5
|
+
def setup
|
6
|
+
setup_dir_var
|
7
|
+
end
|
8
|
+
|
9
|
+
def teardown
|
10
|
+
File.delete(@xlsx) if File.exist?(@xlsx)
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_default_row03
|
14
|
+
@xlsx = 'default_row03.xlsx'
|
15
|
+
workbook = WriteXLSX.new(@xlsx)
|
16
|
+
worksheet = workbook.add_worksheet
|
17
|
+
|
18
|
+
worksheet.set_default_row(24, 1)
|
19
|
+
|
20
|
+
worksheet.write('A1', 'Foo')
|
21
|
+
worksheet.write('A10', 'Bar')
|
22
|
+
|
23
|
+
(1..8).each { |row| worksheet.set_row(row, 24) }
|
24
|
+
|
25
|
+
workbook.close
|
26
|
+
compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'helper'
|
3
|
+
|
4
|
+
class TestRegressionDefaultRow04 < Test::Unit::TestCase
|
5
|
+
def setup
|
6
|
+
setup_dir_var
|
7
|
+
end
|
8
|
+
|
9
|
+
def teardown
|
10
|
+
File.delete(@xlsx) if File.exist?(@xlsx)
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_default_row04
|
14
|
+
@xlsx = 'default_row04.xlsx'
|
15
|
+
workbook = WriteXLSX.new(@xlsx)
|
16
|
+
worksheet = workbook.add_worksheet
|
17
|
+
|
18
|
+
worksheet.set_default_row(24)
|
19
|
+
|
20
|
+
worksheet.write('A1', 'Foo')
|
21
|
+
worksheet.write('A10', 'Bar')
|
22
|
+
|
23
|
+
worksheet.write_comment('C4', 'Hello', :y_offset => 22)
|
24
|
+
|
25
|
+
# Set the author to match the target XLSX file.
|
26
|
+
worksheet.set_comments_author('John')
|
27
|
+
|
28
|
+
workbook.close
|
29
|
+
compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
|
30
|
+
end
|
31
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/test_example_match.rb
CHANGED
@@ -4859,4 +4859,26 @@ EOS
|
|
4859
4859
|
workbook.close
|
4860
4860
|
compare_xlsx(File.join(@perl_output, @xlsx), @xlsx)
|
4861
4861
|
end
|
4862
|
+
|
4863
|
+
def test_hide_row_col
|
4864
|
+
@xlsx = 'hide_row_col.xlsx'
|
4865
|
+
workbook = WriteXLSX.new(@xlsx)
|
4866
|
+
worksheet = workbook.add_worksheet
|
4867
|
+
|
4868
|
+
# Write some data
|
4869
|
+
worksheet.write('D1', 'Some hidden columns.')
|
4870
|
+
worksheet.write('A8', 'Some hidden rows.')
|
4871
|
+
|
4872
|
+
# Hide all rows without data.
|
4873
|
+
worksheet.set_default_row(nil, 1)
|
4874
|
+
|
4875
|
+
# Set emptys row that we do want to display. All other will be hidden.
|
4876
|
+
(1..6).each { |row| worksheet.set_row(row, 15) }
|
4877
|
+
|
4878
|
+
# Hide a range of columns.
|
4879
|
+
worksheet.set_column('G:XFD', nil, nil, 1)
|
4880
|
+
|
4881
|
+
workbook.close
|
4882
|
+
compare_xlsx(File.join(@perl_output, @xlsx), @xlsx)
|
4883
|
+
end
|
4862
4884
|
end
|
@@ -247,13 +247,6 @@ class TestWriteMethods < Test::Unit::TestCase
|
|
247
247
|
end
|
248
248
|
end
|
249
249
|
|
250
|
-
def test_insert_chart_with_valid_arg_not_raise
|
251
|
-
chart = @workbook.add_chart(:type => 'line')
|
252
|
-
assert_nothing_raised do
|
253
|
-
@worksheet.insert_chart(0, 0, chart)
|
254
|
-
end
|
255
|
-
end
|
256
|
-
|
257
250
|
def test_coditional_formatting_with_insufficient_args_raise_InsufficientArgumentError
|
258
251
|
assert_raise(WriteXLSXInsufficientArgumentError) do
|
259
252
|
@worksheet.conditional_formatting()
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: write_xlsx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.61.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubyzip
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- examples/diag_border.rb
|
79
79
|
- examples/formats.rb
|
80
80
|
- examples/headers.rb
|
81
|
+
- examples/hide_row_col.rb
|
81
82
|
- examples/hide_sheet.rb
|
82
83
|
- examples/hyperlink1.rb
|
83
84
|
- examples/indent.rb
|
@@ -111,6 +112,9 @@ files:
|
|
111
112
|
- examples/tab_colors.rb
|
112
113
|
- examples/tables.rb
|
113
114
|
- examples/vbaProject.bin
|
115
|
+
- html/en/doc_en.html
|
116
|
+
- html/index.html
|
117
|
+
- html/style.css
|
114
118
|
- lib/write_xlsx.rb
|
115
119
|
- lib/write_xlsx/chart.rb
|
116
120
|
- lib/write_xlsx/chart/area.rb
|
@@ -127,6 +131,7 @@ files:
|
|
127
131
|
- lib/write_xlsx/drawing.rb
|
128
132
|
- lib/write_xlsx/format.rb
|
129
133
|
- lib/write_xlsx/package/app.rb
|
134
|
+
- lib/write_xlsx/package/button.rb
|
130
135
|
- lib/write_xlsx/package/comments.rb
|
131
136
|
- lib/write_xlsx/package/conditional_format.rb
|
132
137
|
- lib/write_xlsx/package/content_types.rb
|
@@ -243,21 +248,13 @@ files:
|
|
243
248
|
- test/package/table/test_write_table_column.rb
|
244
249
|
- test/package/table/test_write_table_style_info.rb
|
245
250
|
- test/package/table/test_write_xml_declaration.rb
|
246
|
-
- test/package/vml/test_write_anchor.rb
|
247
251
|
- test/package/vml/test_write_auto_fill.rb
|
248
|
-
- test/package/vml/test_write_column.rb
|
249
252
|
- test/package/vml/test_write_div.rb
|
250
|
-
- test/package/vml/test_write_fill.rb
|
251
253
|
- test/package/vml/test_write_idmap.rb
|
252
|
-
- test/package/vml/test_write_move_with_cells.rb
|
253
254
|
- test/package/vml/test_write_path.rb
|
254
|
-
- test/package/vml/test_write_row.rb
|
255
|
-
- test/package/vml/test_write_shadow.rb
|
256
255
|
- test/package/vml/test_write_shapelayout.rb
|
257
256
|
- test/package/vml/test_write_shapetype.rb
|
258
|
-
- test/package/vml/test_write_size_with_cells.rb
|
259
257
|
- test/package/vml/test_write_stroke.rb
|
260
|
-
- test/package/vml/test_write_textbox.rb
|
261
258
|
- test/perl_output/a_simple.xlsx
|
262
259
|
- test/perl_output/add_vba_project.xlsm
|
263
260
|
- test/perl_output/array_formula.xlsx
|
@@ -283,6 +280,7 @@ files:
|
|
283
280
|
- test/perl_output/fit_to_pages.xlsx
|
284
281
|
- test/perl_output/formats.xlsx
|
285
282
|
- test/perl_output/headers.xlsx
|
283
|
+
- test/perl_output/hide_row_col.xlsx
|
286
284
|
- test/perl_output/hide_sheet.xlsx
|
287
285
|
- test/perl_output/hyperlink.xlsx
|
288
286
|
- test/perl_output/indent.xlsx
|
@@ -317,6 +315,7 @@ files:
|
|
317
315
|
- test/perl_output/stocks.xlsx
|
318
316
|
- test/perl_output/tab_colors.xlsx
|
319
317
|
- test/perl_output/tables.xlsx
|
318
|
+
- test/regression/disabled_test_vml04.rb
|
320
319
|
- test/regression/images/blue.jpg
|
321
320
|
- test/regression/images/blue.png
|
322
321
|
- test/regression/images/grey.jpg
|
@@ -467,6 +466,9 @@ files:
|
|
467
466
|
- test/regression/test_chart_scatter05.rb
|
468
467
|
- test/regression/test_chart_scatter06.rb
|
469
468
|
- test/regression/test_chart_scatter07.rb
|
469
|
+
- test/regression/test_chart_size01.rb
|
470
|
+
- test/regression/test_chart_size02.rb
|
471
|
+
- test/regression/test_chart_size03.rb
|
470
472
|
- test/regression/test_chart_sparse01.rb
|
471
473
|
- test/regression/test_chart_stock01.rb
|
472
474
|
- test/regression/test_chart_stock02.rb
|
@@ -504,6 +506,10 @@ files:
|
|
504
506
|
- test/regression/test_custom_colors01.rb
|
505
507
|
- test/regression/test_date_1904_01.rb
|
506
508
|
- test/regression/test_date_1904_02.rb
|
509
|
+
- test/regression/test_default_row01.rb
|
510
|
+
- test/regression/test_default_row02.rb
|
511
|
+
- test/regression/test_default_row03.rb
|
512
|
+
- test/regression/test_default_row04.rb
|
507
513
|
- test/regression/test_defined_name01.rb
|
508
514
|
- test/regression/test_escapes01.rb
|
509
515
|
- test/regression/test_escapes02.rb
|
@@ -638,7 +644,6 @@ files:
|
|
638
644
|
- test/regression/test_vml01.rb
|
639
645
|
- test/regression/test_vml02.rb
|
640
646
|
- test/regression/test_vml03.rb
|
641
|
-
- test/regression/test_vml04.rb
|
642
647
|
- test/regression/xlsx_files/array_formula01.xlsx
|
643
648
|
- test/regression/xlsx_files/array_formula02.xlsx
|
644
649
|
- test/regression/xlsx_files/autofilter00.xlsx
|
@@ -778,6 +783,7 @@ files:
|
|
778
783
|
- test/regression/xlsx_files/chart_scatter05.xlsx
|
779
784
|
- test/regression/xlsx_files/chart_scatter06.xlsx
|
780
785
|
- test/regression/xlsx_files/chart_scatter07.xlsx
|
786
|
+
- test/regression/xlsx_files/chart_size01.xlsx
|
781
787
|
- test/regression/xlsx_files/chart_sparse01.xlsx
|
782
788
|
- test/regression/xlsx_files/chart_stock01.xlsx
|
783
789
|
- test/regression/xlsx_files/chart_stock02.xlsx
|
@@ -816,6 +822,10 @@ files:
|
|
816
822
|
- test/regression/xlsx_files/custom_colors01.xlsx
|
817
823
|
- test/regression/xlsx_files/date_1904_01.xlsx
|
818
824
|
- test/regression/xlsx_files/date_1904_02.xlsx
|
825
|
+
- test/regression/xlsx_files/default_row01.xlsx
|
826
|
+
- test/regression/xlsx_files/default_row02.xlsx
|
827
|
+
- test/regression/xlsx_files/default_row03.xlsx
|
828
|
+
- test/regression/xlsx_files/default_row04.xlsx
|
819
829
|
- test/regression/xlsx_files/defined_name01.xlsx
|
820
830
|
- test/regression/xlsx_files/escapes01.xlsx
|
821
831
|
- test/regression/xlsx_files/escapes02.xlsx
|
@@ -1027,7 +1037,6 @@ files:
|
|
1027
1037
|
- test/worksheet/test_write_filters.rb
|
1028
1038
|
- test/worksheet/test_write_header_footer.rb
|
1029
1039
|
- test/worksheet/test_write_hyperlink.rb
|
1030
|
-
- test/worksheet/test_write_hyperlinks.rb
|
1031
1040
|
- test/worksheet/test_write_legacy_drawing.rb
|
1032
1041
|
- test/worksheet/test_write_merge_cell.rb
|
1033
1042
|
- test/worksheet/test_write_merge_cells.rb
|
@@ -1182,21 +1191,13 @@ test_files:
|
|
1182
1191
|
- test/package/table/test_write_table_column.rb
|
1183
1192
|
- test/package/table/test_write_table_style_info.rb
|
1184
1193
|
- test/package/table/test_write_xml_declaration.rb
|
1185
|
-
- test/package/vml/test_write_anchor.rb
|
1186
1194
|
- test/package/vml/test_write_auto_fill.rb
|
1187
|
-
- test/package/vml/test_write_column.rb
|
1188
1195
|
- test/package/vml/test_write_div.rb
|
1189
|
-
- test/package/vml/test_write_fill.rb
|
1190
1196
|
- test/package/vml/test_write_idmap.rb
|
1191
|
-
- test/package/vml/test_write_move_with_cells.rb
|
1192
1197
|
- test/package/vml/test_write_path.rb
|
1193
|
-
- test/package/vml/test_write_row.rb
|
1194
|
-
- test/package/vml/test_write_shadow.rb
|
1195
1198
|
- test/package/vml/test_write_shapelayout.rb
|
1196
1199
|
- test/package/vml/test_write_shapetype.rb
|
1197
|
-
- test/package/vml/test_write_size_with_cells.rb
|
1198
1200
|
- test/package/vml/test_write_stroke.rb
|
1199
|
-
- test/package/vml/test_write_textbox.rb
|
1200
1201
|
- test/perl_output/a_simple.xlsx
|
1201
1202
|
- test/perl_output/add_vba_project.xlsm
|
1202
1203
|
- test/perl_output/array_formula.xlsx
|
@@ -1222,6 +1223,7 @@ test_files:
|
|
1222
1223
|
- test/perl_output/fit_to_pages.xlsx
|
1223
1224
|
- test/perl_output/formats.xlsx
|
1224
1225
|
- test/perl_output/headers.xlsx
|
1226
|
+
- test/perl_output/hide_row_col.xlsx
|
1225
1227
|
- test/perl_output/hide_sheet.xlsx
|
1226
1228
|
- test/perl_output/hyperlink.xlsx
|
1227
1229
|
- test/perl_output/indent.xlsx
|
@@ -1256,6 +1258,7 @@ test_files:
|
|
1256
1258
|
- test/perl_output/stocks.xlsx
|
1257
1259
|
- test/perl_output/tab_colors.xlsx
|
1258
1260
|
- test/perl_output/tables.xlsx
|
1261
|
+
- test/regression/disabled_test_vml04.rb
|
1259
1262
|
- test/regression/images/blue.jpg
|
1260
1263
|
- test/regression/images/blue.png
|
1261
1264
|
- test/regression/images/grey.jpg
|
@@ -1406,6 +1409,9 @@ test_files:
|
|
1406
1409
|
- test/regression/test_chart_scatter05.rb
|
1407
1410
|
- test/regression/test_chart_scatter06.rb
|
1408
1411
|
- test/regression/test_chart_scatter07.rb
|
1412
|
+
- test/regression/test_chart_size01.rb
|
1413
|
+
- test/regression/test_chart_size02.rb
|
1414
|
+
- test/regression/test_chart_size03.rb
|
1409
1415
|
- test/regression/test_chart_sparse01.rb
|
1410
1416
|
- test/regression/test_chart_stock01.rb
|
1411
1417
|
- test/regression/test_chart_stock02.rb
|
@@ -1443,6 +1449,10 @@ test_files:
|
|
1443
1449
|
- test/regression/test_custom_colors01.rb
|
1444
1450
|
- test/regression/test_date_1904_01.rb
|
1445
1451
|
- test/regression/test_date_1904_02.rb
|
1452
|
+
- test/regression/test_default_row01.rb
|
1453
|
+
- test/regression/test_default_row02.rb
|
1454
|
+
- test/regression/test_default_row03.rb
|
1455
|
+
- test/regression/test_default_row04.rb
|
1446
1456
|
- test/regression/test_defined_name01.rb
|
1447
1457
|
- test/regression/test_escapes01.rb
|
1448
1458
|
- test/regression/test_escapes02.rb
|
@@ -1577,7 +1587,6 @@ test_files:
|
|
1577
1587
|
- test/regression/test_vml01.rb
|
1578
1588
|
- test/regression/test_vml02.rb
|
1579
1589
|
- test/regression/test_vml03.rb
|
1580
|
-
- test/regression/test_vml04.rb
|
1581
1590
|
- test/regression/xlsx_files/array_formula01.xlsx
|
1582
1591
|
- test/regression/xlsx_files/array_formula02.xlsx
|
1583
1592
|
- test/regression/xlsx_files/autofilter00.xlsx
|
@@ -1717,6 +1726,7 @@ test_files:
|
|
1717
1726
|
- test/regression/xlsx_files/chart_scatter05.xlsx
|
1718
1727
|
- test/regression/xlsx_files/chart_scatter06.xlsx
|
1719
1728
|
- test/regression/xlsx_files/chart_scatter07.xlsx
|
1729
|
+
- test/regression/xlsx_files/chart_size01.xlsx
|
1720
1730
|
- test/regression/xlsx_files/chart_sparse01.xlsx
|
1721
1731
|
- test/regression/xlsx_files/chart_stock01.xlsx
|
1722
1732
|
- test/regression/xlsx_files/chart_stock02.xlsx
|
@@ -1755,6 +1765,10 @@ test_files:
|
|
1755
1765
|
- test/regression/xlsx_files/custom_colors01.xlsx
|
1756
1766
|
- test/regression/xlsx_files/date_1904_01.xlsx
|
1757
1767
|
- test/regression/xlsx_files/date_1904_02.xlsx
|
1768
|
+
- test/regression/xlsx_files/default_row01.xlsx
|
1769
|
+
- test/regression/xlsx_files/default_row02.xlsx
|
1770
|
+
- test/regression/xlsx_files/default_row03.xlsx
|
1771
|
+
- test/regression/xlsx_files/default_row04.xlsx
|
1758
1772
|
- test/regression/xlsx_files/defined_name01.xlsx
|
1759
1773
|
- test/regression/xlsx_files/escapes01.xlsx
|
1760
1774
|
- test/regression/xlsx_files/escapes02.xlsx
|
@@ -1966,7 +1980,6 @@ test_files:
|
|
1966
1980
|
- test/worksheet/test_write_filters.rb
|
1967
1981
|
- test/worksheet/test_write_header_footer.rb
|
1968
1982
|
- test/worksheet/test_write_hyperlink.rb
|
1969
|
-
- test/worksheet/test_write_hyperlinks.rb
|
1970
1983
|
- test/worksheet/test_write_legacy_drawing.rb
|
1971
1984
|
- test/worksheet/test_write_merge_cell.rb
|
1972
1985
|
- test/worksheet/test_write_merge_cells.rb
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
require 'helper'
|
3
|
-
require 'write_xlsx/workbook'
|
4
|
-
require 'write_xlsx/package/vml'
|
5
|
-
|
6
|
-
class TestWriteAnchor < Test::Unit::TestCase
|
7
|
-
def test_write_anchor
|
8
|
-
vml = Writexlsx::Package::Vml.new
|
9
|
-
vml.__send__('write_anchor', [ 2, 0, 15, 10, 4, 4, 15, 4 ])
|
10
|
-
result = vml.instance_variable_get(:@writer).string
|
11
|
-
expected = '<x:Anchor>2, 15, 0, 10, 4, 15, 4, 4</x:Anchor>'
|
12
|
-
assert_equal(expected, result)
|
13
|
-
end
|
14
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
require 'helper'
|
3
|
-
require 'write_xlsx/workbook'
|
4
|
-
require 'write_xlsx/package/vml'
|
5
|
-
|
6
|
-
class TestWriteColumn < Test::Unit::TestCase
|
7
|
-
def test_write_auto_column
|
8
|
-
vml = Writexlsx::Package::Vml.new
|
9
|
-
vml.__send__('write_column', 2)
|
10
|
-
result = vml.instance_variable_get(:@writer).string
|
11
|
-
expected = '<x:Column>2</x:Column>'
|
12
|
-
assert_equal(expected, result)
|
13
|
-
end
|
14
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
require 'helper'
|
3
|
-
require 'write_xlsx/workbook'
|
4
|
-
require 'write_xlsx/package/vml'
|
5
|
-
|
6
|
-
class TestWriteFill < Test::Unit::TestCase
|
7
|
-
def test_write_comment_fill
|
8
|
-
vml = Writexlsx::Package::Vml.new
|
9
|
-
vml.__send__('write_comment_fill')
|
10
|
-
result = vml.instance_variable_get(:@writer).string
|
11
|
-
expected = '<v:fill color2="#ffffe1"/>'
|
12
|
-
assert_equal(expected, result)
|
13
|
-
end
|
14
|
-
|
15
|
-
def test_write_button_fill
|
16
|
-
vml = Writexlsx::Package::Vml.new
|
17
|
-
vml.__send__('write_button_fill')
|
18
|
-
result = vml.instance_variable_get(:@writer).string
|
19
|
-
expected = '<v:fill color2="buttonFace [67]" o:detectmouseclick="t"/>'
|
20
|
-
assert_equal(expected, result)
|
21
|
-
end
|
22
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
require 'helper'
|
3
|
-
require 'write_xlsx/workbook'
|
4
|
-
require 'write_xlsx/package/vml'
|
5
|
-
|
6
|
-
class TestWriteMoveWithCells < Test::Unit::TestCase
|
7
|
-
def test_write_move_with_cells
|
8
|
-
vml = Writexlsx::Package::Vml.new
|
9
|
-
vml.__send__('write_move_with_cells')
|
10
|
-
result = vml.instance_variable_get(:@writer).string
|
11
|
-
expected = '<x:MoveWithCells/>'
|
12
|
-
assert_equal(expected, result)
|
13
|
-
end
|
14
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
require 'helper'
|
3
|
-
require 'write_xlsx/workbook'
|
4
|
-
require 'write_xlsx/package/vml'
|
5
|
-
|
6
|
-
class TestWriteRow < Test::Unit::TestCase
|
7
|
-
def test_write_row
|
8
|
-
vml = Writexlsx::Package::Vml.new
|
9
|
-
vml.__send__('write_row', 2)
|
10
|
-
result = vml.instance_variable_get(:@writer).string
|
11
|
-
expected = '<x:Row>2</x:Row>'
|
12
|
-
assert_equal(expected, result)
|
13
|
-
end
|
14
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
require 'helper'
|
3
|
-
require 'write_xlsx/workbook'
|
4
|
-
require 'write_xlsx/package/vml'
|
5
|
-
|
6
|
-
class TestWriteShadow < Test::Unit::TestCase
|
7
|
-
def test_write_shadow
|
8
|
-
vml = Writexlsx::Package::Vml.new
|
9
|
-
vml.__send__('write_shadow')
|
10
|
-
result = vml.instance_variable_get(:@writer).string
|
11
|
-
expected = '<v:shadow on="t" color="black" obscured="t"/>'
|
12
|
-
assert_equal(expected, result)
|
13
|
-
end
|
14
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
require 'helper'
|
3
|
-
require 'write_xlsx/workbook'
|
4
|
-
require 'write_xlsx/package/vml'
|
5
|
-
|
6
|
-
class TestWriteSizeWithCells < Test::Unit::TestCase
|
7
|
-
def test_write_size_with_cells
|
8
|
-
vml = Writexlsx::Package::Vml.new
|
9
|
-
vml.__send__('write_size_with_cells')
|
10
|
-
result = vml.instance_variable_get(:@writer).string
|
11
|
-
expected = '<x:SizeWithCells/>'
|
12
|
-
assert_equal(expected, result)
|
13
|
-
end
|
14
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
require 'helper'
|
3
|
-
require 'write_xlsx/workbook'
|
4
|
-
require 'write_xlsx/package/vml'
|
5
|
-
|
6
|
-
class TestWriteTextbox < Test::Unit::TestCase
|
7
|
-
def test_write_textbox
|
8
|
-
vml = Writexlsx::Package::Vml.new
|
9
|
-
vml.__send__('write_comment_textbox')
|
10
|
-
result = vml.instance_variable_get(:@writer).string
|
11
|
-
expected = '<v:textbox style="mso-direction-alt:auto"><div style="text-align:left"></div></v:textbox>'
|
12
|
-
assert_equal(expected, result)
|
13
|
-
end
|
14
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
require 'helper'
|
3
|
-
require 'write_xlsx'
|
4
|
-
require 'stringio'
|
5
|
-
|
6
|
-
class TestWriteHyperlinks < Test::Unit::TestCase
|
7
|
-
def setup
|
8
|
-
@workbook = WriteXLSX.new(StringIO.new)
|
9
|
-
@worksheet = @workbook.add_worksheet('')
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_write_hyperlinks
|
13
|
-
@worksheet.instance_variable_set(:@hlink_refs, [[ 1, 0, 0, 1 ]])
|
14
|
-
@worksheet.__send__('write_hyperlinks')
|
15
|
-
result = @worksheet.instance_variable_get(:@writer).string
|
16
|
-
expected = '<hyperlinks><hyperlink ref="A1" r:id="rId1"/></hyperlinks>'
|
17
|
-
assert_equal(expected, result)
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_write_hyperlinks_internal
|
21
|
-
@worksheet.instance_variable_set(:@hlink_refs, [[ 2, 0, 0, 'Sheet2!A1', 'Sheet2!A1' ]])
|
22
|
-
@worksheet.__send__('write_hyperlinks')
|
23
|
-
result = @worksheet.instance_variable_get(:@writer).string
|
24
|
-
expected = '<hyperlinks><hyperlink ref="A1" location="Sheet2!A1" display="Sheet2!A1"/></hyperlinks>'
|
25
|
-
assert_equal(expected, result)
|
26
|
-
end
|
27
|
-
end
|