write_xlsx 0.62.0 → 0.64.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. data/README.rdoc +14 -1
  2. data/examples/chart_data_tools.rb +215 -0
  3. data/examples/chart_pie.rb +36 -5
  4. data/examples/sparklines2.rb +1 -1
  5. data/examples/tab_colors.rb +3 -3
  6. data/lib/write_xlsx/chart.rb +559 -516
  7. data/lib/write_xlsx/chart/area.rb +4 -1
  8. data/lib/write_xlsx/chart/axis.rb +132 -0
  9. data/lib/write_xlsx/chart/bar.rb +17 -9
  10. data/lib/write_xlsx/chart/column.rb +9 -1
  11. data/lib/write_xlsx/chart/line.rb +24 -0
  12. data/lib/write_xlsx/chart/radar.rb +2 -2
  13. data/lib/write_xlsx/chart/scatter.rb +19 -0
  14. data/lib/write_xlsx/chart/stock.rb +10 -3
  15. data/lib/write_xlsx/drawing.rb +43 -44
  16. data/lib/write_xlsx/package/vml.rb +21 -14
  17. data/lib/write_xlsx/shape.rb +173 -22
  18. data/lib/write_xlsx/sparkline.rb +524 -0
  19. data/lib/write_xlsx/version.rb +1 -1
  20. data/lib/write_xlsx/workbook.rb +183 -115
  21. data/lib/write_xlsx/worksheet.rb +821 -1073
  22. data/lib/write_xlsx/worksheet/cell_data.rb +132 -0
  23. data/lib/write_xlsx/worksheet/print_style.rb +51 -0
  24. data/test/chart/test_add_series.rb +31 -6
  25. data/test/chart/test_write_d_lbls.rb +18 -18
  26. data/test/chart/test_write_number_format.rb +20 -24
  27. data/test/drawing/test_drawing_shape_01.rb +1 -1
  28. data/test/drawing/test_drawing_shape_02.rb +2 -2
  29. data/test/drawing/test_drawing_shape_03.rb +5 -5
  30. data/test/drawing/test_drawing_shape_04.rb +3 -3
  31. data/test/drawing/test_drawing_shape_05.rb +4 -4
  32. data/test/drawing/test_drawing_shape_07.rb +2 -2
  33. data/test/perl_output/chart_data_tools.xlsx +0 -0
  34. data/test/perl_output/chart_pie.xlsx +0 -0
  35. data/test/regression/disabled_test_vml04.rb +2 -2
  36. data/test/regression/test_chart_drop_lines01.rb +46 -0
  37. data/test/regression/test_chart_drop_lines02.rb +51 -0
  38. data/test/regression/test_chart_drop_lines03.rb +46 -0
  39. data/test/regression/test_chart_drop_lines04.rb +64 -0
  40. data/test/regression/test_chart_errorbars01.rb +47 -0
  41. data/test/regression/test_chart_errorbars02.rb +57 -0
  42. data/test/regression/test_chart_errorbars03.rb +53 -0
  43. data/test/regression/test_chart_errorbars04.rb +48 -0
  44. data/test/regression/test_chart_errorbars05.rb +47 -0
  45. data/test/regression/test_chart_errorbars06.rb +47 -0
  46. data/test/regression/test_chart_errorbars07.rb +66 -0
  47. data/test/regression/test_chart_font02.rb +1 -1
  48. data/test/regression/test_chart_font06.rb +1 -1
  49. data/test/regression/test_chart_gridlines04.rb +2 -1
  50. data/test/regression/test_chart_gridlines08.rb +2 -1
  51. data/test/regression/test_chart_points01.rb +37 -0
  52. data/test/regression/test_chart_points02.rb +40 -0
  53. data/test/regression/test_chart_points03.rb +42 -0
  54. data/test/regression/test_chart_points04.rb +52 -0
  55. data/test/regression/test_chart_points05.rb +49 -0
  56. data/test/regression/test_chart_points06.rb +49 -0
  57. data/test/regression/test_chartsheet05.rb +1 -1
  58. data/test/regression/test_chartsheet06.rb +1 -1
  59. data/test/regression/test_comment01.rb +1 -1
  60. data/test/regression/test_comment02.rb +1 -1
  61. data/test/regression/test_comment03.rb +1 -1
  62. data/test/regression/test_comment04.rb +2 -2
  63. data/test/regression/test_comment06.rb +1 -1
  64. data/test/regression/test_comment07.rb +1 -1
  65. data/test/regression/test_comment08.rb +1 -1
  66. data/test/regression/test_comment09.rb +1 -1
  67. data/test/regression/test_comment10.rb +1 -1
  68. data/test/regression/test_default_row04.rb +1 -1
  69. data/test/regression/test_escapes02.rb +1 -1
  70. data/test/regression/test_hyperlink15.rb +2 -2
  71. data/test/regression/test_shape_connect01.rb +6 -6
  72. data/test/regression/test_shape_connect02.rb +6 -6
  73. data/test/regression/test_shape_connect03.rb +11 -11
  74. data/test/regression/test_shape_connect04.rb +10 -10
  75. data/test/regression/test_shape_scale01.rb +2 -2
  76. data/test/regression/test_shape_stencil01.rb +3 -3
  77. data/test/regression/test_tab_color01.rb +1 -1
  78. data/test/regression/test_table04.rb +1 -1
  79. data/test/regression/test_table05.rb +1 -1
  80. data/test/regression/test_table06.rb +1 -1
  81. data/test/regression/test_vml01.rb +1 -1
  82. data/test/regression/test_vml02.rb +1 -1
  83. data/test/regression/test_vml03.rb +2 -2
  84. data/test/regression/xlsx_files/chart_drop_lines01.xlsx +0 -0
  85. data/test/regression/xlsx_files/chart_drop_lines02.xlsx +0 -0
  86. data/test/regression/xlsx_files/chart_drop_lines03.xlsx +0 -0
  87. data/test/regression/xlsx_files/chart_drop_lines04.xlsx +0 -0
  88. data/test/regression/xlsx_files/chart_errorbars01.xlsx +0 -0
  89. data/test/regression/xlsx_files/chart_errorbars02.xlsx +0 -0
  90. data/test/regression/xlsx_files/chart_errorbars03.xlsx +0 -0
  91. data/test/regression/xlsx_files/chart_errorbars04.xlsx +0 -0
  92. data/test/regression/xlsx_files/chart_errorbars05.xlsx +0 -0
  93. data/test/regression/xlsx_files/chart_errorbars06.xlsx +0 -0
  94. data/test/regression/xlsx_files/chart_errorbars07.xlsx +0 -0
  95. data/test/regression/xlsx_files/chart_points01.xlsx +0 -0
  96. data/test/regression/xlsx_files/chart_points02.xlsx +0 -0
  97. data/test/regression/xlsx_files/chart_points03.xlsx +0 -0
  98. data/test/regression/xlsx_files/chart_points04.xlsx +0 -0
  99. data/test/regression/xlsx_files/chart_points05.xlsx +0 -0
  100. data/test/regression/xlsx_files/chart_points06.xlsx +0 -0
  101. data/test/regression/xlsx_files/chart_stock02.xlsx +0 -0
  102. data/test/test_example_match.rb +278 -57
  103. data/test/worksheet/test_convert_date_time_02.rb +427 -433
  104. data/test/worksheet/test_convert_date_time_03.rb +1 -1
  105. data/test/worksheet/test_write_sheet_pr.rb +2 -2
  106. data/test/worksheet/test_write_sheet_view1.rb +2 -2
  107. metadata +80 -10
@@ -0,0 +1,49 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'helper'
3
+
4
+ class TestRegressionChartPoints06 < 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_points06
14
+ @xlsx = 'chart_points06.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", [71050368, 71051904])
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(
31
+ :categories => '=Sheet1!$A$1:$A$5',
32
+ :values => '=Sheet1!$B$1:$B$5',
33
+ :marker => { :type => 'automatic' },
34
+ :points => [
35
+ { :fill => { :color => 'red' } }
36
+ ]
37
+ )
38
+ chart.add_series(
39
+ :categories => '=Sheet1!$A$1:$A$5',
40
+ :values => '=Sheet1!$C$1:$C$5',
41
+ :marker => { :type => 'automatic' }
42
+ )
43
+
44
+ worksheet.insert_chart('E9', chart)
45
+
46
+ workbook.close
47
+ compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
48
+ end
49
+ end
@@ -33,7 +33,7 @@ def test_chartsheet05
33
33
  chart.add_series(:values => '=Sheet1!$C$1:$C$5')
34
34
 
35
35
  # Chartsheet test.
36
- chart.set_zoom(75)
36
+ chart.zoom = 75
37
37
 
38
38
  workbook.close
39
39
  compare_xlsx_for_regression(
@@ -33,7 +33,7 @@ def test_chartsheet06
33
33
  chart.add_series(:values => '=Sheet1!$C$1:$C$5')
34
34
 
35
35
  # Chartsheet test.
36
- chart.set_tab_color('red')
36
+ chart.tab_color = 'red'
37
37
 
38
38
  workbook.close
39
39
  compare_xlsx_for_regression(
@@ -19,7 +19,7 @@ def test_comment01
19
19
  worksheet.write_comment('B2', 'Some text')
20
20
 
21
21
  # Set the author to match the target XLSX file.
22
- worksheet.set_comments_author('John')
22
+ worksheet.comments_author = 'John'
23
23
 
24
24
  workbook.close
25
25
  compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
@@ -20,7 +20,7 @@ def test_comment02
20
20
  worksheet.write_comment('D17', 'More text')
21
21
 
22
22
  # Set the author to match the target XLSX file.
23
- worksheet.set_comments_author('John')
23
+ worksheet.comments_author = 'John'
24
24
 
25
25
  workbook.close
26
26
  compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
@@ -20,7 +20,7 @@ def test_comment03
20
20
  worksheet.write_comment('XFD1048576', 'Some text')
21
21
 
22
22
  # Set the author to match the target XLSX file.
23
- worksheet.set_comments_author('John')
23
+ worksheet.comments_author = 'John'
24
24
 
25
25
  workbook.close
26
26
  compare_xlsx_for_regression(
@@ -24,8 +24,8 @@ def test_comment04
24
24
  worksheet3.write_comment('C7', 'More text')
25
25
 
26
26
  # Set the author to match the target XLSX file.
27
- worksheet1.set_comments_author('John')
28
- worksheet3.set_comments_author('John')
27
+ worksheet1.comments_author = 'John'
28
+ worksheet3.comments_author = 'John'
29
29
 
30
30
  workbook.close
31
31
  compare_xlsx_for_regression(
@@ -22,7 +22,7 @@ def test_comment06
22
22
  worksheet.write_comment('A5', 'Some text')
23
23
 
24
24
  # Set the author to match the target XLSX file.
25
- worksheet.set_comments_author('John')
25
+ worksheet.comments_author = 'John'
26
26
 
27
27
  workbook.close
28
28
  compare_xlsx_for_regression(
@@ -24,7 +24,7 @@ def test_comment07
24
24
  worksheet.show_comments
25
25
 
26
26
  # Set the author to match the target XLSX file.
27
- worksheet.set_comments_author('John')
27
+ worksheet.comments_author = 'John'
28
28
 
29
29
  workbook.close
30
30
  compare_xlsx_for_regression(
@@ -24,7 +24,7 @@ def test_comment08
24
24
  worksheet.show_comments
25
25
 
26
26
  # Set the author to match the target XLSX file.
27
- worksheet.set_comments_author('John')
27
+ worksheet.comments_author = 'John'
28
28
 
29
29
  workbook.close
30
30
  compare_xlsx_for_regression(
@@ -20,7 +20,7 @@ def test_comment09
20
20
  worksheet.write_comment('A3', 'Some text')
21
21
 
22
22
  # Set the author to match the target XLSX file.
23
- worksheet.set_comments_author('John')
23
+ worksheet.comments_author = 'John'
24
24
 
25
25
  workbook.close
26
26
  compare_xlsx_for_regression(
@@ -19,7 +19,7 @@ def test_comment10
19
19
  worksheet.write_comment('B2', 'Some text', :color => 51)
20
20
 
21
21
  # Set the author to match the target XLSX file.
22
- worksheet.set_comments_author('John')
22
+ worksheet.comments_author = 'John'
23
23
 
24
24
  workbook.close
25
25
  compare_xlsx_for_regression(
@@ -23,7 +23,7 @@ def test_default_row04
23
23
  worksheet.write_comment('C4', 'Hello', :y_offset => 22)
24
24
 
25
25
  # Set the author to match the target XLSX file.
26
- worksheet.set_comments_author('John')
26
+ worksheet.comments_author = 'John'
27
27
 
28
28
  workbook.close
29
29
  compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
@@ -19,7 +19,7 @@ def test_chart_escapes02
19
19
  worksheet.write_comment('B2', %q{<>&"'})
20
20
 
21
21
  # Set the author to match the target XLSX file.
22
- worksheet.set_comments_author(%q{I am '"<>&})
22
+ worksheet.comments_author = %q{I am '"<>&}
23
23
 
24
24
  workbook.close
25
25
  compare_xlsx_for_regression(
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  require 'helper'
3
3
 
4
- class TestRegressionHyperlink16 < Test::Unit::TestCase
4
+ class TestRegressionHyperlink15 < Test::Unit::TestCase
5
5
  def setup
6
6
  setup_dir_var
7
7
  end
@@ -10,7 +10,7 @@ def teardown
10
10
  File.delete(@xlsx) if File.exist?(@xlsx)
11
11
  end
12
12
 
13
- def test_hyperlink16
13
+ def test_hyperlink15
14
14
  @xlsx = 'hyperlink16.xlsx'
15
15
  workbook = WriteXLSX.new(@xlsx)
16
16
  worksheet = workbook.add_worksheet
@@ -29,14 +29,14 @@ def test_shape_connect01
29
29
  cxn_shape = workbook.add_shape(:type => 'bentConnector3')
30
30
 
31
31
  # Link the connector to the bottom of the circle
32
- cxn_shape[:start] = ellipse[:id]
33
- cxn_shape[:start_index] = 4 # 4th connection point, clockwise from top(0)
34
- cxn_shape[:start_side] = 'b' # r)ight or b)ottom
32
+ cxn_shape.start = ellipse.id
33
+ cxn_shape.start_index = 4 # 4th connection point, clockwise from top(0)
34
+ cxn_shape.start_side = 'b' # r)ight or b)ottom
35
35
 
36
36
  # Link the connector to the bottom of the plus sign
37
- cxn_shape[:end] = plus[:id]
38
- cxn_shape[:end_index] = 0 # 0 - top connection point
39
- cxn_shape[:end_side] = 't' # l)eft of t)op
37
+ cxn_shape.end = plus.id
38
+ cxn_shape.end_index = 0 # 0 - top connection point
39
+ cxn_shape.end_side = 't' # l)eft of t)op
40
40
 
41
41
  worksheet.insert_shape('A1', cxn_shape, 0, 0)
42
42
 
@@ -25,14 +25,14 @@ def test_shape_connect02
25
25
  cxn_shape = workbook.add_shape(:type => 'curvedConnector3')
26
26
 
27
27
  # Link the start of the connector to the right side
28
- cxn_shape[:start] = s1[:id]
29
- cxn_shape[:start_index] = 2 # 2nd connection point, clockwise from top(0)
30
- cxn_shape[:start_side] = 'r' # r)ight or b)ottom
28
+ cxn_shape.start = s1.id
29
+ cxn_shape.start_index = 2 # 2nd connection point, clockwise from top(0)
30
+ cxn_shape.start_side = 'r' # r)ight or b)ottom
31
31
 
32
32
  # Link the end of the connector to the left side
33
- cxn_shape[:end] = s2[:id]
34
- cxn_shape[:end_index] = 4 # 4th connection point, clockwise from top(0)
35
- cxn_shape[:end_side] = 'l' # l)eft or t)op
33
+ cxn_shape.end = s2.id
34
+ cxn_shape.end_index = 4 # 4th connection point, clockwise from top(0)
35
+ cxn_shape.end_side = 'l' # l)eft or t)op
36
36
 
37
37
  worksheet.insert_shape('A1', cxn_shape, 0, 0)
38
38
 
@@ -48,28 +48,28 @@ def test_shape_connect03
48
48
  p2 = worksheet.insert_shape('A1', plus, 150, 350)
49
49
  p3 = worksheet.insert_shape('A1', plus, 350, 150)
50
50
 
51
- plus[:adjustments] = 35 # change shape of plus symbol
51
+ plus.adjustments = 35 # change shape of plus symbol
52
52
  p4 = worksheet.insert_shape('A1', plus, 150, 150)
53
53
 
54
54
  cxn_shape = workbook.add_shape(:type => 'bentConnector3', :fill=> 0)
55
- cxn_shape[:start] = ellipse[:id]
56
- cxn_shape[:start_index] = 4 # 4th connection point, clockwise from top(0)
57
- cxn_shape[:start_side] = 'b' # r)ight or b)ottom
55
+ cxn_shape.start = ellipse.id
56
+ cxn_shape.start_index = 4 # 4th connection point, clockwise from top(0)
57
+ cxn_shape.start_side = 'b' # r)ight or b)ottom
58
58
 
59
- cxn_shape[:end] = p1[:id]
60
- cxn_shape[:end_index] = 0 # first connection (zero based) from top
61
- cxn_shape[:end_side] = 't' # l)eft or t)op
59
+ cxn_shape.end = p1.id
60
+ cxn_shape.end_index = 0 # first connection (zero based) from top
61
+ cxn_shape.end_side = 't' # l)eft or t)op
62
62
 
63
63
  worksheet.insert_shape('A1', cxn_shape, 0, 0)
64
64
 
65
- cxn_shape[:end] = p2[:id]
65
+ cxn_shape.end = p2.id
66
66
  worksheet.insert_shape('A1', cxn_shape, 0, 0)
67
67
 
68
- cxn_shape[:end] = p3[:id]
68
+ cxn_shape.end = p3.id
69
69
  worksheet.insert_shape('A1', cxn_shape, 0, 0)
70
70
 
71
- cxn_shape[:end] = p4[:id]
72
- cxn_shape[:adjustments] = [-50, 45, 120]
71
+ cxn_shape.end = p4.id
72
+ cxn_shape.adjustments = [-50, 45, 120]
73
73
  worksheet.insert_shape('A1', cxn_shape, 0, 0)
74
74
 
75
75
  workbook.close
@@ -49,24 +49,24 @@ def test_shape_connect04
49
49
 
50
50
  cxn_shape = workbook.add_shape(:type => 'bentConnector3', :fill => 0)
51
51
 
52
- cxn_shape[:start] = ellipse[:id]
53
- cxn_shape[:start_index] = 2 # 2nd connection point, clockwise from top(0)
54
- cxn_shape[:start_side] = 'r' # r)ight or b)ottom
52
+ cxn_shape.start = ellipse.id
53
+ cxn_shape.start_index = 2 # 2nd connection point, clockwise from top(0)
54
+ cxn_shape.start_side = 'r' # r)ight or b)ottom
55
55
 
56
- cxn_shape[:end] = p1[:id]
57
- cxn_shape[:end_index] = 3 # 3rd connection point on plus, right side
58
- cxn_shape[:end_side] = 'l' # l)eft or t)op
56
+ cxn_shape.end = p1.id
57
+ cxn_shape.end_index = 3 # 3rd connection point on plus, right side
58
+ cxn_shape.end_side = 'l' # l)eft or t)op
59
59
 
60
60
  worksheet.insert_shape('A1', cxn_shape, 0, 0)
61
61
 
62
- cxn_shape[:end] = p2[:id]
62
+ cxn_shape.end = p2.id
63
63
  worksheet.insert_shape('A1', cxn_shape, 0, 0)
64
64
 
65
- cxn_shape[:end] = p3[:id]
65
+ cxn_shape.end = p3.id
66
66
  worksheet.insert_shape('A1', cxn_shape, 0, 0)
67
67
 
68
- cxn_shape[:end] = p4[:id]
69
- cxn_shape[:adjustments] = [-50, 45, 120]
68
+ cxn_shape.end = p4.id
69
+ cxn_shape.adjustments = [-50, 45, 120]
70
70
  worksheet.insert_shape('A1', cxn_shape, 0, 0)
71
71
 
72
72
  workbook.close
@@ -26,8 +26,8 @@ def test_shape_scale01
26
26
  )
27
27
  worksheet.insert_shape('A1', normal, 50, 50)
28
28
 
29
- normal[:text] = 'Scaled 3w x 2h'
30
- normal[:name] = 'Hope'
29
+ normal.text = 'Scaled 3w x 2h'
30
+ normal.name = 'Hope'
31
31
  worksheet.insert_shape('A1', normal, 250, 50, 3, 2)
32
32
 
33
33
  workbook.close
@@ -27,9 +27,9 @@ def test_shape_stencil01
27
27
  (1..10).each do |n|
28
28
  # Change the last 5 rectangles to stars.
29
29
  # Previously inserted shapes stay as rectangles
30
- shape[:type] = 'star5' if n == 6
31
- text = shape[:type]
32
- shape[:text] = [text, n.to_s].join(' ')
30
+ shape.type = 'star5' if n == 6
31
+ text = shape.type
32
+ shape.text = [text, n.to_s].join(' ')
33
33
  worksheet.insert_shape('A1', shape, n * 100, 50)
34
34
  end
35
35
 
@@ -16,7 +16,7 @@ def test_tab_color01
16
16
  worksheet = workbook.add_worksheet
17
17
 
18
18
  worksheet.write('A1', 'Foo')
19
- worksheet.set_tab_color('red')
19
+ worksheet.tab_color = 'red'
20
20
 
21
21
  workbook.close
22
22
  compare_xlsx_for_regression(
@@ -25,7 +25,7 @@ def test_table04
25
25
  worksheet.write('A1', 'http://perl.com/')
26
26
 
27
27
  # Add comments to check rId handling.
28
- worksheet.set_comments_author('John')
28
+ worksheet.comments_author = 'John'
29
29
  worksheet.write_comment('H1', 'Test1')
30
30
  worksheet.write_comment('J1', 'Test2')
31
31
  workbook.close
@@ -25,7 +25,7 @@ def test_table05
25
25
  worksheet.write('A1', 'http://perl.com/')
26
26
 
27
27
  # Add comments to check rId handling.
28
- worksheet.set_comments_author('John')
28
+ worksheet.comments_author = 'John'
29
29
  worksheet.write_comment('H1', 'Test1')
30
30
  worksheet.write_comment('J1', 'Test2')
31
31
 
@@ -28,7 +28,7 @@ def test_table06
28
28
  worksheet.write('C1', 'http://perl.com/')
29
29
 
30
30
  # Add comments to check rId handling.
31
- worksheet.set_comments_author('John')
31
+ worksheet.comments_author = 'John'
32
32
  worksheet.write_comment('H1', 'Test1')
33
33
  worksheet.write_comment('J1', 'Test2')
34
34
 
@@ -19,7 +19,7 @@ def test_vml01
19
19
  worksheet.write_comment('B2', 'Some text')
20
20
 
21
21
  # Set the author to match the target XLSX file.
22
- worksheet.set_comments_author('John')
22
+ worksheet.comments_author = 'John'
23
23
 
24
24
  worksheet.insert_button('C4', {})
25
25
 
@@ -20,7 +20,7 @@ def test_vml02
20
20
  worksheet.write_comment('D17', 'More text')
21
21
 
22
22
  # Set the author to match the target XLSX file.
23
- worksheet.set_comments_author('John')
23
+ worksheet.comments_author = 'John'
24
24
 
25
25
  worksheet.insert_button('C4', {})
26
26
  worksheet.insert_button('E8', {})
@@ -24,8 +24,8 @@ def test_vml03
24
24
  worksheet3.write_comment('C7', 'More text')
25
25
 
26
26
  # Set the author to match the target XLSX file.
27
- worksheet1.set_comments_author('John')
28
- worksheet3.set_comments_author('John')
27
+ worksheet1.comments_author = 'John'
28
+ worksheet3.comments_author = 'John'
29
29
 
30
30
  worksheet1.insert_button('C4', {})
31
31
  worksheet1.insert_button('E8', {})