write_xlsx 1.10.1 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +15 -0
- data/Changes +21 -0
- data/README.md +1 -1
- data/examples/autofit.rb +37 -0
- data/examples/chart_radar.rb +3 -9
- data/lib/write_xlsx/chart.rb +1 -1
- data/lib/write_xlsx/format.rb +4 -2
- data/lib/write_xlsx/package/conditional_format.rb +15 -4
- data/lib/write_xlsx/package/shared_strings.rb +5 -3
- data/lib/write_xlsx/package/styles.rb +16 -17
- data/lib/write_xlsx/package/table.rb +34 -16
- data/lib/write_xlsx/utility.rb +45 -11
- data/lib/write_xlsx/version.rb +1 -1
- data/lib/write_xlsx/workbook.rb +21 -11
- data/lib/write_xlsx/worksheet/cell_data.rb +13 -5
- data/lib/write_xlsx/worksheet/data_validation.rb +13 -1
- data/lib/write_xlsx/worksheet.rb +702 -278
- metadata +4 -3
@@ -13,7 +13,19 @@ module Writexlsx
|
|
13
13
|
|
14
14
|
def initialize(*args)
|
15
15
|
# Check for a cell reference in A1 notation and substitute row and column.
|
16
|
-
|
16
|
+
if (row_col_array = row_col_notation(args.first))
|
17
|
+
case row_col_array.size
|
18
|
+
when 2
|
19
|
+
row1, col1 = row_col_array
|
20
|
+
row2, col2, options = args[1..-1]
|
21
|
+
when 4
|
22
|
+
row1, col1, row2, col2 = row_col_array
|
23
|
+
options = args[1]
|
24
|
+
end
|
25
|
+
else
|
26
|
+
row1, col1, row2, col2, options = args
|
27
|
+
end
|
28
|
+
|
17
29
|
if row2.respond_to?(:keys)
|
18
30
|
options_to_instance_variable(row2.dup)
|
19
31
|
row2 = row1
|