write_xlsx 1.10.0 → 1.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +10 -0
- data/Changes +9 -0
- data/README.md +2 -2
- data/examples/autofilter.rb +1 -1
- data/examples/chart_area.rb +12 -12
- data/examples/chart_bar.rb +12 -12
- data/examples/chart_clustered.rb +12 -12
- data/examples/chart_column.rb +12 -12
- data/examples/chart_combined.rb +25 -25
- data/examples/chart_data_labels.rb +99 -99
- data/examples/chart_data_table.rb +25 -25
- data/examples/chart_data_tools.rb +50 -50
- data/examples/chart_doughnut.rb +29 -29
- data/examples/chart_gauge.rb +18 -18
- data/examples/chart_line.rb +32 -32
- data/examples/chart_pareto.rb +16 -16
- data/examples/chart_pie.rb +17 -17
- data/examples/chart_radar.rb +38 -38
- data/examples/chart_scatter.rb +12 -12
- data/examples/chart_secondary_axis.rb +13 -13
- data/examples/chart_stock.rb +12 -12
- data/examples/chart_styles.rb +5 -5
- data/examples/colors.rb +11 -11
- data/examples/comments2.rb +15 -15
- data/examples/conditional_format.rb +74 -74
- data/examples/data_validate.rb +64 -64
- data/examples/date_time.rb +3 -3
- data/examples/demo.rb +14 -14
- data/examples/diag_border.rb +6 -6
- data/examples/dynamic_arrays.rb +2 -2
- data/examples/formats.rb +10 -10
- data/examples/hyperlink1.rb +4 -4
- data/examples/ignore_errors.rb +2 -2
- data/examples/indent.rb +2 -2
- data/examples/macros.rb +4 -4
- data/examples/merge1.rb +1 -1
- data/examples/merge2.rb +9 -9
- data/examples/merge3.rb +5 -5
- data/examples/merge4.rb +20 -20
- data/examples/merge5.rb +18 -18
- data/examples/merge6.rb +7 -7
- data/examples/outline.rb +1 -1
- data/examples/outline_collapsed.rb +1 -1
- data/examples/panes.rb +4 -4
- data/examples/properties.rb +9 -9
- data/examples/protection.rb +2 -2
- data/examples/rich_strings.rb +6 -6
- data/examples/shape1.rb +7 -7
- data/examples/shape2.rb +16 -16
- data/examples/shape3.rb +5 -5
- data/examples/shape4.rb +7 -7
- data/examples/shape5.rb +7 -7
- data/examples/shape6.rb +7 -7
- data/examples/shape7.rb +10 -10
- data/examples/shape8.rb +10 -10
- data/examples/shape_all.rb +4 -4
- data/examples/sparklines1.rb +11 -11
- data/examples/sparklines2.rb +76 -76
- data/examples/tables.rb +87 -87
- data/examples/watermark.rb +1 -1
- data/lib/write_xlsx/chart/bar.rb +4 -4
- data/lib/write_xlsx/chart/line.rb +1 -1
- data/lib/write_xlsx/chart/radar.rb +2 -2
- data/lib/write_xlsx/chart/scatter.rb +4 -4
- data/lib/write_xlsx/chart/series.rb +27 -27
- data/lib/write_xlsx/chart/stock.rb +5 -5
- data/lib/write_xlsx/chart.rb +30 -30
- data/lib/write_xlsx/colors.rb +19 -19
- data/lib/write_xlsx/package/conditional_format.rb +18 -7
- data/lib/write_xlsx/package/table.rb +33 -24
- data/lib/write_xlsx/shape.rb +5 -5
- data/lib/write_xlsx/sheets.rb +1 -1
- data/lib/write_xlsx/sparkline.rb +286 -286
- data/lib/write_xlsx/utility.rb +32 -31
- data/lib/write_xlsx/version.rb +1 -1
- data/lib/write_xlsx/workbook.rb +20 -20
- data/lib/write_xlsx/worksheet/cell_data.rb +1 -1
- data/lib/write_xlsx/worksheet/data_validation.rb +13 -1
- data/lib/write_xlsx/worksheet.rb +486 -246
- metadata +3 -3
data/examples/watermark.rb
CHANGED
@@ -20,7 +20,7 @@ worksheet = workbook.add_worksheet
|
|
20
20
|
dirname = File.dirname(File.expand_path(__FILE__))
|
21
21
|
worksheet.set_header(
|
22
22
|
'&C&C&[Picture]', nil,
|
23
|
-
{ :
|
23
|
+
{ image_center: File.join(dirname, 'watermark.png') }
|
24
24
|
)
|
25
25
|
|
26
26
|
workbook.close
|
data/lib/write_xlsx/chart/bar.rb
CHANGED
@@ -86,14 +86,14 @@ module Writexlsx
|
|
86
86
|
|
87
87
|
def axis_defaults_set
|
88
88
|
if @x_axis.defaults
|
89
|
-
@x_axis.defaults[:major_gridlines] = { :
|
89
|
+
@x_axis.defaults[:major_gridlines] = { visible: 1 }
|
90
90
|
else
|
91
|
-
@x_axis.defaults = { :
|
91
|
+
@x_axis.defaults = { major_gridlines: { visible: 1 } }
|
92
92
|
end
|
93
93
|
if @y_axis.defaults
|
94
|
-
@y_axis.defaults[:major_gridlines] = { :
|
94
|
+
@y_axis.defaults[:major_gridlines] = { visible: 0 }
|
95
95
|
else
|
96
|
-
@y_axis.defaults = { :
|
96
|
+
@y_axis.defaults = { major_gridlines: { visible: 0 } }
|
97
97
|
end
|
98
98
|
@x_axis.defaults[:num_format] = '0%' if @subtype == 'percent_stacked'
|
99
99
|
end
|
@@ -32,10 +32,10 @@ module Writexlsx
|
|
32
32
|
def initialize(subtype)
|
33
33
|
super(subtype)
|
34
34
|
@subtype = subtype || 'marker'
|
35
|
-
@default_marker = Marker.new(:
|
35
|
+
@default_marker = Marker.new(type: 'none') if @subtype == 'marker'
|
36
36
|
|
37
37
|
# Override and reset the default axis values.
|
38
|
-
@x_axis.defaults[:major_gridlines] = { :
|
38
|
+
@x_axis.defaults[:major_gridlines] = { visible: 1 }
|
39
39
|
set_x_axis
|
40
40
|
|
41
41
|
# Hardcode major_tick_mark for now untill there is an accessor.
|
@@ -123,8 +123,8 @@ module Writexlsx
|
|
123
123
|
write_layout(@plotarea.layout, 'plot')
|
124
124
|
|
125
125
|
# Write the subclass chart type elements for primary and secondary axes.
|
126
|
-
write_chart_type(:
|
127
|
-
write_chart_type(:
|
126
|
+
write_chart_type(primary_axes: 1)
|
127
|
+
write_chart_type(primary_axes: 0)
|
128
128
|
|
129
129
|
# Write c:catAx and c:valAx elements for series using primary axes.
|
130
130
|
write_cat_val_axis(@x_axis, @y_axis, @axis_ids, 'b')
|
@@ -201,7 +201,7 @@ module Writexlsx
|
|
201
201
|
# Go through each series and define default values.
|
202
202
|
@series.each do |series|
|
203
203
|
# Set a line type unless there is already a user defined type.
|
204
|
-
series.line = line_properties(:
|
204
|
+
series.line = line_properties(width: 2.25, none: 1, _defined: 1) unless series.line_defined?
|
205
205
|
end
|
206
206
|
end
|
207
207
|
|
@@ -210,7 +210,7 @@ module Writexlsx
|
|
210
210
|
# Go through each series and define default values.
|
211
211
|
@series.each do |series|
|
212
212
|
# Set a marker type unless there is already a user defined type.
|
213
|
-
series.marker = Marker.new(:
|
213
|
+
series.marker = Marker.new(type: 'none', _defined: 1) unless ptrue?(series.marker)
|
214
214
|
end
|
215
215
|
end
|
216
216
|
end
|
@@ -77,12 +77,12 @@ module Writexlsx
|
|
77
77
|
|
78
78
|
def types
|
79
79
|
{
|
80
|
-
:
|
81
|
-
:
|
82
|
-
:
|
83
|
-
:
|
84
|
-
:
|
85
|
-
:
|
80
|
+
exponential: 'exp',
|
81
|
+
linear: 'linear',
|
82
|
+
log: 'log',
|
83
|
+
moving_average: 'movingAvg',
|
84
|
+
polynomial: 'poly',
|
85
|
+
power: 'power'
|
86
86
|
}
|
87
87
|
end
|
88
88
|
end
|
@@ -108,20 +108,20 @@ module Writexlsx
|
|
108
108
|
|
109
109
|
def types
|
110
110
|
{
|
111
|
-
:
|
112
|
-
:
|
113
|
-
:
|
114
|
-
:
|
115
|
-
:
|
116
|
-
:
|
117
|
-
:
|
118
|
-
:
|
119
|
-
:
|
120
|
-
:
|
121
|
-
:
|
122
|
-
:
|
123
|
-
:
|
124
|
-
:
|
111
|
+
automatic: 'automatic',
|
112
|
+
none: 'none',
|
113
|
+
square: 'square',
|
114
|
+
diamond: 'diamond',
|
115
|
+
triangle: 'triangle',
|
116
|
+
x: 'x',
|
117
|
+
star: 'star',
|
118
|
+
dot: 'dot',
|
119
|
+
short_dash: 'dot',
|
120
|
+
dash: 'dash',
|
121
|
+
long_dash: 'dash',
|
122
|
+
circle: 'circle',
|
123
|
+
plus: 'plus',
|
124
|
+
picture: 'picture'
|
125
125
|
}
|
126
126
|
end
|
127
127
|
end
|
@@ -155,11 +155,11 @@ module Writexlsx
|
|
155
155
|
|
156
156
|
def types
|
157
157
|
{
|
158
|
-
:
|
159
|
-
:
|
160
|
-
:
|
161
|
-
:
|
162
|
-
:
|
158
|
+
fixed: 'fixedVal',
|
159
|
+
percentage: 'percentage',
|
160
|
+
standard_deviation: 'stdDev',
|
161
|
+
standard_error: 'stdErr',
|
162
|
+
custom: 'cust'
|
163
163
|
}
|
164
164
|
end
|
165
165
|
|
@@ -261,8 +261,8 @@ module Writexlsx
|
|
261
261
|
|
262
262
|
def errorbars(x, y)
|
263
263
|
{
|
264
|
-
:
|
265
|
-
:
|
264
|
+
_x_error_bars: x ? Errorbars.new(x) : nil,
|
265
|
+
_y_error_bars: y ? Errorbars.new(y) : nil
|
266
266
|
}
|
267
267
|
end
|
268
268
|
|
@@ -104,17 +104,17 @@ module Writexlsx
|
|
104
104
|
if index % 4 != 3
|
105
105
|
unless series.line_defined?
|
106
106
|
series.line = {
|
107
|
-
:
|
108
|
-
:
|
109
|
-
:
|
107
|
+
width: 2.25,
|
108
|
+
none: 1,
|
109
|
+
_defined: 1
|
110
110
|
}
|
111
111
|
end
|
112
112
|
|
113
113
|
unless ptrue?(series.marker)
|
114
114
|
series.marker = if index % 4 == 2
|
115
|
-
Marker.new(:
|
115
|
+
Marker.new(type: 'dot', size: 3)
|
116
116
|
else
|
117
|
-
Marker.new(:
|
117
|
+
Marker.new(type: 'none')
|
118
118
|
end
|
119
119
|
end
|
120
120
|
end
|
data/lib/write_xlsx/chart.rb
CHANGED
@@ -70,7 +70,7 @@ module Writexlsx
|
|
70
70
|
@gradient = gradient_properties(params[:gradient])
|
71
71
|
|
72
72
|
# Map deprecated Spreadsheet::WriteExcel fill colour.
|
73
|
-
fill = params[:color] ? { :
|
73
|
+
fill = params[:color] ? { color: params[:color] } : params[:fill]
|
74
74
|
@fill = fill_properties(fill)
|
75
75
|
|
76
76
|
# Pattern fill overrides solid fill.
|
@@ -90,13 +90,13 @@ module Writexlsx
|
|
90
90
|
|
91
91
|
# Map deprecated Spreadsheet::WriteExcel line_weight.
|
92
92
|
border = params[:border]
|
93
|
-
border = { :
|
93
|
+
border = { width: swe_line_weight(line_weight) } if line_weight
|
94
94
|
|
95
95
|
# Map deprecated Spreadsheet::WriteExcel line_pattern.
|
96
96
|
if params[:line_pattern]
|
97
97
|
pattern = swe_line_pattern(params[:line_pattern])
|
98
98
|
if pattern == 'none'
|
99
|
-
border = { :
|
99
|
+
border = { none: 1 }
|
100
100
|
else
|
101
101
|
border[:dash_type] = pattern
|
102
102
|
end
|
@@ -432,8 +432,8 @@ module Writexlsx
|
|
432
432
|
|
433
433
|
# Set the up and down bar properties.
|
434
434
|
@up_down_bars = {
|
435
|
-
:
|
436
|
-
:
|
435
|
+
_up: Chartline.new(params[:up]),
|
436
|
+
_down: Chartline.new(params[:down])
|
437
437
|
}
|
438
438
|
end
|
439
439
|
|
@@ -695,33 +695,33 @@ module Writexlsx
|
|
695
695
|
|
696
696
|
def x_axis_defaults
|
697
697
|
{
|
698
|
-
:
|
699
|
-
:
|
698
|
+
num_format: 'General',
|
699
|
+
major_gridlines: { visible: 0 }
|
700
700
|
}
|
701
701
|
end
|
702
702
|
|
703
703
|
def y_axis_defaults
|
704
704
|
{
|
705
|
-
:
|
706
|
-
:
|
705
|
+
num_format: 'General',
|
706
|
+
major_gridlines: { visible: 1 }
|
707
707
|
}
|
708
708
|
end
|
709
709
|
|
710
710
|
def x2_axis_defaults
|
711
711
|
{
|
712
|
-
:
|
713
|
-
:
|
714
|
-
:
|
715
|
-
:
|
712
|
+
num_format: 'General',
|
713
|
+
label_position: 'none',
|
714
|
+
crossing: 'max',
|
715
|
+
visible: 0
|
716
716
|
}
|
717
717
|
end
|
718
718
|
|
719
719
|
def y2_axis_defaults
|
720
720
|
{
|
721
|
-
:
|
722
|
-
:
|
723
|
-
:
|
724
|
-
:
|
721
|
+
num_format: 'General',
|
722
|
+
major_gridlines: { visible: 0 },
|
723
|
+
position: 'right',
|
724
|
+
visible: 1
|
725
725
|
}
|
726
726
|
end
|
727
727
|
|
@@ -803,8 +803,8 @@ module Writexlsx
|
|
803
803
|
# Write the c:layout element.
|
804
804
|
write_layout(@plotarea.layout, 'plot')
|
805
805
|
# Write the subclass chart type elements for primary and secondary axes.
|
806
|
-
write_chart_type(:
|
807
|
-
write_chart_type(:
|
806
|
+
write_chart_type(primary_axes: 1)
|
807
|
+
write_chart_type(primary_axes: 0)
|
808
808
|
|
809
809
|
# Configure a combined chart if present.
|
810
810
|
if second_chart
|
@@ -823,15 +823,15 @@ module Writexlsx
|
|
823
823
|
second_chart.series_index = @series_index
|
824
824
|
|
825
825
|
# Write the subclass chart type elements for combined chart.
|
826
|
-
second_chart.write_chart_type(:
|
827
|
-
second_chart.write_chart_type(:
|
826
|
+
second_chart.write_chart_type(primary_axes: 1)
|
827
|
+
second_chart.write_chart_type(primary_axes: 0)
|
828
828
|
end
|
829
829
|
|
830
830
|
# Write the category and value elements for the primary axes.
|
831
831
|
params = {
|
832
|
-
:
|
833
|
-
:
|
834
|
-
:
|
832
|
+
x_axis: @x_axis,
|
833
|
+
y_axis: @y_axis,
|
834
|
+
axis_ids: @axis_ids
|
835
835
|
}
|
836
836
|
|
837
837
|
if @date_category
|
@@ -844,9 +844,9 @@ module Writexlsx
|
|
844
844
|
|
845
845
|
# Write the category and value elements for the secondary axes.
|
846
846
|
params = {
|
847
|
-
:
|
848
|
-
:
|
849
|
-
:
|
847
|
+
x_axis: @x2_axis,
|
848
|
+
y_axis: @y2_axis,
|
849
|
+
axis_ids: @axis2_ids
|
850
850
|
}
|
851
851
|
|
852
852
|
write_val_axis(@x2_axis, @y2_axis, @axis2_ids)
|
@@ -855,9 +855,9 @@ module Writexlsx
|
|
855
855
|
if second_chart && second_chart.is_secondary?
|
856
856
|
|
857
857
|
params = {
|
858
|
-
:
|
859
|
-
:
|
860
|
-
:
|
858
|
+
x_axis: second_chart.x2_axis,
|
859
|
+
y_axis: second_chart.y2_axis,
|
860
|
+
axis_ids: second_chart.axis2_ids
|
861
861
|
}
|
862
862
|
|
863
863
|
second_chart.write_val_axis(
|
data/lib/write_xlsx/colors.rb
CHANGED
@@ -4,25 +4,25 @@
|
|
4
4
|
module Writexlsx
|
5
5
|
class Colors
|
6
6
|
COLORS = {
|
7
|
-
:
|
8
|
-
:
|
9
|
-
:
|
10
|
-
:
|
11
|
-
:
|
12
|
-
:
|
13
|
-
:
|
14
|
-
:
|
15
|
-
:
|
16
|
-
:
|
17
|
-
:
|
18
|
-
:
|
19
|
-
:
|
20
|
-
:
|
21
|
-
:
|
22
|
-
:
|
23
|
-
:
|
24
|
-
:
|
25
|
-
:
|
7
|
+
aqua: 0x0F,
|
8
|
+
cyan: 0x0F,
|
9
|
+
black: 0x08,
|
10
|
+
blue: 0x0C,
|
11
|
+
brown: 0x10,
|
12
|
+
magenta: 0x0E,
|
13
|
+
fuchsia: 0x0E,
|
14
|
+
gray: 0x17,
|
15
|
+
grey: 0x17,
|
16
|
+
green: 0x11,
|
17
|
+
lime: 0x0B,
|
18
|
+
navy: 0x12,
|
19
|
+
orange: 0x35,
|
20
|
+
pink: 0x21,
|
21
|
+
purple: 0x14,
|
22
|
+
red: 0x0A,
|
23
|
+
silver: 0x16,
|
24
|
+
white: 0x09,
|
25
|
+
yellow: 0x0D
|
26
26
|
} # :nodoc:
|
27
27
|
|
28
28
|
###############################################################################
|
@@ -409,12 +409,23 @@ module Writexlsx
|
|
409
409
|
|
410
410
|
def row_col_param_for_conditional_formatting(*args)
|
411
411
|
# Check for a cell reference in A1 notation and substitute row and column
|
412
|
-
if args[0].to_s =~ (/^\D/) && (args[0] =~ /,/)
|
413
|
-
|
414
|
-
|
412
|
+
user_range = if args[0].to_s =~ (/^\D/) && (args[0] =~ /,/)
|
413
|
+
# Check for a user defined multiple range like B3:K6,B8:K11.
|
414
|
+
args[0].sub(/^=/, '').gsub(/\s*,\s*/, ' ').gsub(/\$/, '')
|
415
|
+
end
|
416
|
+
|
417
|
+
if (row_col_array = row_col_notation(args.first))
|
418
|
+
if row_col_array.size == 2
|
419
|
+
row1, col1 = row_col_array
|
420
|
+
row2 = args[1]
|
421
|
+
elsif row_col_array.size == 4
|
422
|
+
row1, col1, row2, col2 = row_col_array
|
423
|
+
param = args[1]
|
424
|
+
end
|
425
|
+
else
|
426
|
+
row1, col1, row2, col2, param = args
|
415
427
|
end
|
416
428
|
|
417
|
-
row1, col1, row2, col2, param = row_col_notation(args)
|
418
429
|
if row2.respond_to?(:keys)
|
419
430
|
param = row2
|
420
431
|
row2 = row1
|
@@ -658,9 +669,9 @@ module Writexlsx
|
|
658
669
|
# Set the default icon properties.
|
659
670
|
total_icons.times do
|
660
671
|
props << {
|
661
|
-
:
|
662
|
-
:
|
663
|
-
:
|
672
|
+
criteria: 0,
|
673
|
+
value: 0,
|
674
|
+
type: 'percent'
|
664
675
|
}
|
665
676
|
end
|
666
677
|
|
@@ -162,41 +162,50 @@ module Writexlsx
|
|
162
162
|
|
163
163
|
private
|
164
164
|
|
165
|
-
def handle_args(
|
165
|
+
def handle_args(row1, col1 = nil, row2 = nil, col2 = nil, param = nil)
|
166
166
|
# Check for a cell reference in A1 notation and substitute row and column
|
167
|
-
|
167
|
+
if (row_col_array = row_col_notation(row1))
|
168
|
+
_row1, _col1, _row2, _col2 = row_col_array
|
169
|
+
_param = col1
|
170
|
+
else
|
171
|
+
_row1 = row1
|
172
|
+
_col1 = col1
|
173
|
+
_row2 = row2
|
174
|
+
_col2 = col2
|
175
|
+
_param = param
|
176
|
+
end
|
168
177
|
|
169
178
|
# Check for a valid number of args.
|
170
|
-
raise "Not enough parameters to add_table()" if [
|
179
|
+
raise "Not enough parameters to add_table()" if [_row1, _col1, _row2, _col2].include?(nil)
|
171
180
|
|
172
181
|
# Check that row and col are valid without storing the values.
|
173
|
-
check_dimensions_and_update_max_min_values(
|
174
|
-
check_dimensions_and_update_max_min_values(
|
182
|
+
check_dimensions_and_update_max_min_values(_row1, _col1, 1, 1)
|
183
|
+
check_dimensions_and_update_max_min_values(_row2, _col2, 1, 1)
|
175
184
|
|
176
185
|
# Swap last row/col for first row/col as necessary.
|
177
|
-
|
178
|
-
|
186
|
+
_row1, _row2 = _row2, _row1 if _row1 > _row2
|
187
|
+
_col1, _col2 = _col2, _col1 if _col1 > _col2
|
179
188
|
|
180
189
|
# The final hash contains the validation parameters.
|
181
|
-
|
190
|
+
_param ||= {}
|
182
191
|
|
183
192
|
# Turn on Excel's defaults.
|
184
|
-
|
185
|
-
|
186
|
-
|
193
|
+
_param[:banded_rows] ||= 1
|
194
|
+
_param[:header_row] ||= 1
|
195
|
+
_param[:autofilter] ||= 1
|
187
196
|
|
188
197
|
# Check that there are enough rows.
|
189
|
-
num_rows =
|
190
|
-
num_rows -= 1 if ptrue?(
|
198
|
+
num_rows = _row2 - _row1
|
199
|
+
num_rows -= 1 if ptrue?(_param[:header_row])
|
191
200
|
|
192
201
|
raise "Must have at least one data row in in add_table()" if num_rows < 0
|
193
202
|
|
194
203
|
# If the header row if off the default is to turn autofilter off.
|
195
|
-
|
204
|
+
_param[:autofilter] = 0 if _param[:header_row] == 0
|
196
205
|
|
197
|
-
check_parameter(
|
206
|
+
check_parameter(_param, valid_table_parameter, 'add_table')
|
198
207
|
|
199
|
-
[
|
208
|
+
[_row1, _row2, _col1, _col2, _param]
|
200
209
|
end
|
201
210
|
|
202
211
|
# List of valid input parameters.
|
@@ -248,14 +257,14 @@ module Writexlsx
|
|
248
257
|
.gsub(/\]/, "']")
|
249
258
|
|
250
259
|
subtotals = {
|
251
|
-
:
|
252
|
-
:
|
253
|
-
:
|
254
|
-
:
|
255
|
-
:
|
256
|
-
:
|
257
|
-
:
|
258
|
-
:
|
260
|
+
average: 101,
|
261
|
+
countNums: 102,
|
262
|
+
count: 103,
|
263
|
+
max: 104,
|
264
|
+
min: 105,
|
265
|
+
stdDev: 107,
|
266
|
+
sum: 109,
|
267
|
+
var: 110
|
259
268
|
}
|
260
269
|
|
261
270
|
unless (func_num = subtotals[function.to_sym])
|
data/lib/write_xlsx/shape.rb
CHANGED
@@ -204,11 +204,11 @@ module Writexlsx
|
|
204
204
|
def auto_locate_connectors(shapes, shape_hash)
|
205
205
|
# Valid connector shapes.
|
206
206
|
connector_shapes = {
|
207
|
-
:
|
208
|
-
:
|
209
|
-
:
|
210
|
-
:
|
211
|
-
:
|
207
|
+
straightConnector: 1,
|
208
|
+
Connector: 1,
|
209
|
+
bentConnector: 1,
|
210
|
+
curvedConnector: 1,
|
211
|
+
line: 1
|
212
212
|
}
|
213
213
|
|
214
214
|
shape_base = @type.chop.to_sym # Remove the number of segments from end of type.
|
data/lib/write_xlsx/sheets.rb
CHANGED