xlsxrb 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +93 -1
- data/README.md +79 -19
- data/lib/ruby_lsp/xlsxrb/completion_listener.rb +31 -61
- data/lib/xlsxrb/chart_builder.rb +595 -113
- data/lib/xlsxrb/dsl_helpers.rb +72 -20
- data/lib/xlsxrb/elements/cell.rb +243 -56
- data/lib/xlsxrb/elements/column.rb +94 -5
- data/lib/xlsxrb/elements/coordinate_access.rb +108 -10
- data/lib/xlsxrb/elements/image.rb +81 -15
- data/lib/xlsxrb/elements/metadata.rb +2733 -0
- data/lib/xlsxrb/elements/row.rb +130 -46
- data/lib/xlsxrb/elements/styles.rb +184 -76
- data/lib/xlsxrb/elements/types.rb +242 -7
- data/lib/xlsxrb/elements/workbook.rb +171 -82
- data/lib/xlsxrb/elements/worksheet.rb +598 -102
- data/lib/xlsxrb/elements.rb +1 -0
- data/lib/xlsxrb/ooxml/reader/listeners/core_listeners.rb +12 -4
- data/lib/xlsxrb/ooxml/reader/listeners/drawing_listeners.rb +7 -2
- data/lib/xlsxrb/ooxml/reader/listeners/feature_listeners.rb +264 -17
- data/lib/xlsxrb/ooxml/reader/listeners/style_listeners.rb +17 -3
- data/lib/xlsxrb/ooxml/reader.rb +4 -0
- data/lib/xlsxrb/ooxml/styles_parser.rb +10 -3
- data/lib/xlsxrb/ooxml/workbook_writer.rb +90 -36
- data/lib/xlsxrb/ooxml/worksheet_parser.rb +2 -2
- data/lib/xlsxrb/ooxml/worksheet_writer.rb +64 -19
- data/lib/xlsxrb/ooxml/writer/drawing_xml.rb +5 -2
- data/lib/xlsxrb/ooxml/writer/features_xml.rb +26 -5
- data/lib/xlsxrb/ooxml/writer/styles_xml.rb +19 -9
- data/lib/xlsxrb/ooxml/writer.rb +22 -6
- data/lib/xlsxrb/ooxml/zip_generator.rb +2 -0
- data/lib/xlsxrb/ooxml/zip_reader.rb +47 -10
- data/lib/xlsxrb/stream_row.rb +97 -18
- data/lib/xlsxrb/stream_sheet.rb +706 -190
- data/lib/xlsxrb/stream_writer.rb +1893 -374
- data/lib/xlsxrb/style_builder.rb +774 -111
- data/lib/xlsxrb/utils.rb +66 -106
- data/lib/xlsxrb/version.rb +1 -1
- data/lib/xlsxrb/workbook_builder.rb +380 -83
- data/lib/xlsxrb/worksheet_builder.rb +1210 -233
- data/lib/xlsxrb.rb +1266 -326
- data/sig/generated/xlsxrb/chart_builder.rbs +319 -90
- data/sig/generated/xlsxrb/dsl_helpers.rbs +20 -2
- data/sig/generated/xlsxrb/elements/cell.rbs +92 -20
- data/sig/generated/xlsxrb/elements/column.rbs +61 -2
- data/sig/generated/xlsxrb/elements/coordinate_access.rbs +49 -7
- data/sig/generated/xlsxrb/elements/image.rbs +30 -8
- data/sig/generated/xlsxrb/elements/metadata.rbs +1587 -0
- data/sig/generated/xlsxrb/elements/row.rbs +61 -21
- data/sig/generated/xlsxrb/elements/styles.rbs +96 -58
- data/sig/generated/xlsxrb/elements/types.rbs +27 -0
- data/sig/generated/xlsxrb/elements/workbook.rbs +63 -52
- data/sig/generated/xlsxrb/elements/worksheet.rbs +192 -51
- data/sig/generated/xlsxrb/ooxml/reader/listeners/feature_listeners.rbs +61 -0
- data/sig/generated/xlsxrb/ooxml/reader.rbs +3 -0
- data/sig/generated/xlsxrb/ooxml/workbook_writer.rbs +1 -1
- data/sig/generated/xlsxrb/ooxml/worksheet_writer.rbs +1 -1
- data/sig/generated/xlsxrb/ooxml/writer.rbs +3 -0
- data/sig/generated/xlsxrb/ooxml/zip_generator.rbs +2 -0
- data/sig/generated/xlsxrb/ooxml/zip_reader.rbs +2 -2
- data/sig/generated/xlsxrb/stream_row.rbs +48 -14
- data/sig/generated/xlsxrb/stream_sheet.rbs +324 -115
- data/sig/generated/xlsxrb/stream_writer.rbs +1068 -255
- data/sig/generated/xlsxrb/style_builder.rbs +389 -79
- data/sig/generated/xlsxrb/utils.rbs +34 -18
- data/sig/generated/xlsxrb/workbook_builder.rbs +234 -34
- data/sig/generated/xlsxrb/worksheet_builder.rbs +628 -126
- data/sig/generated/xlsxrb.rbs +257 -49
- metadata +3 -1
|
@@ -13,21 +13,43 @@ module Xlsxrb
|
|
|
13
13
|
#
|
|
14
14
|
# @api public
|
|
15
15
|
class StreamWriter
|
|
16
|
+
OMITTED: untyped
|
|
17
|
+
|
|
16
18
|
# @return [String, nil] Name of the currently active worksheet.
|
|
19
|
+
# @api private
|
|
17
20
|
# : String?
|
|
18
21
|
attr_reader current_sheet: untyped
|
|
19
22
|
|
|
20
23
|
# @return [Boolean] Whether to treat strings starting with formula prefixes as plain text.
|
|
24
|
+
# : bool
|
|
21
25
|
attr_accessor escape_formulas: untyped
|
|
22
26
|
|
|
23
|
-
#
|
|
24
|
-
|
|
27
|
+
# Returns whether formula escaping is enabled.
|
|
28
|
+
#
|
|
29
|
+
# @return [Boolean]
|
|
30
|
+
# @api public
|
|
31
|
+
# : () -> bool
|
|
32
|
+
def escape_formulas?: () -> bool
|
|
33
|
+
|
|
34
|
+
# Returns whether the shared strings table is enabled.
|
|
35
|
+
#
|
|
36
|
+
# @return [Boolean]
|
|
37
|
+
# @api public
|
|
38
|
+
# : () -> bool
|
|
39
|
+
def shared_strings?: () -> bool
|
|
25
40
|
|
|
26
|
-
|
|
41
|
+
# @deprecated Use {#shared_strings?} instead. Will be removed in 0.2.0.
|
|
42
|
+
# : () -> bool
|
|
43
|
+
def shared_strings: () -> bool
|
|
27
44
|
|
|
28
45
|
# @return [Integer] The ZIP deflate compression level (0..9).
|
|
46
|
+
# : Integer
|
|
29
47
|
attr_reader compression_level: untyped
|
|
30
48
|
|
|
49
|
+
# @return [Hash{String => StyleBuilder}]
|
|
50
|
+
# : Hash[String, StyleBuilder]
|
|
51
|
+
attr_reader styles: untyped
|
|
52
|
+
|
|
31
53
|
# Initializes a streaming writer context.
|
|
32
54
|
#
|
|
33
55
|
# @param target [String, IO, StringIO] Destination file path or writable IO stream.
|
|
@@ -49,44 +71,75 @@ module Xlsxrb
|
|
|
49
71
|
# @param name_or_index [String, Symbol, Integer, nil] Sheet name or 0-based sheet index.
|
|
50
72
|
# @return [String, Symbol, Integer, nil]
|
|
51
73
|
# @api public
|
|
74
|
+
# Gets or sets the active worksheet tab in the workbook window.
|
|
75
|
+
#
|
|
76
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#active_sheet=} instead.
|
|
77
|
+
# @param name_or_index [String, Symbol, Integer, nil] Sheet name or 0-based sheet index.
|
|
78
|
+
# @return [String, Symbol, Integer, nil]
|
|
79
|
+
# @api public
|
|
52
80
|
# : (?String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
53
81
|
def active_sheet: (?String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
54
82
|
|
|
55
|
-
|
|
56
|
-
|
|
83
|
+
# @deprecated Use {#active_sheet} instead. Will be removed in 0.2.0.
|
|
57
84
|
alias active_tab active_sheet
|
|
58
85
|
|
|
59
|
-
|
|
86
|
+
# Sets the active worksheet tab in the workbook window.
|
|
87
|
+
#
|
|
88
|
+
# @param name_or_index [String, Symbol, Integer, nil] Sheet name or 0-based sheet index.
|
|
89
|
+
# @return [String, Symbol, Integer, nil]
|
|
90
|
+
# @api public
|
|
91
|
+
attr_writer active_sheet: String | Symbol | Integer | nil
|
|
92
|
+
|
|
93
|
+
# @deprecated Use {#active_sheet=} instead. Will be removed in 0.2.0.
|
|
94
|
+
alias active_tab= active_sheet=
|
|
60
95
|
|
|
61
96
|
# Gets or sets the first sheet tab visible in the sheet tab scroll area.
|
|
62
97
|
#
|
|
98
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#first_sheet=} instead.
|
|
63
99
|
# @param name_or_index [String, Symbol, Integer, nil] Sheet name or 0-based sheet index.
|
|
64
100
|
# @return [String, Symbol, Integer, nil]
|
|
65
101
|
# @api public
|
|
66
102
|
# : (?String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
67
103
|
def first_sheet: (?String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
68
104
|
|
|
69
|
-
|
|
105
|
+
# Sets the first sheet tab visible in the sheet tab scroll area.
|
|
106
|
+
#
|
|
107
|
+
# @param name_or_index [String, Symbol, Integer, nil] Sheet name or 0-based sheet index.
|
|
108
|
+
# @return [String, Symbol, Integer, nil]
|
|
109
|
+
# @api public
|
|
110
|
+
attr_writer first_sheet: String | Symbol | Integer | nil
|
|
70
111
|
|
|
71
112
|
# Gets or sets whether sheet tabs are visible in the workbook window.
|
|
72
113
|
#
|
|
114
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#show_sheet_tabs=} instead.
|
|
73
115
|
# @param visible [Boolean, nil]
|
|
74
116
|
# @return [Boolean, nil]
|
|
75
117
|
# @api public
|
|
76
118
|
# : (?bool? visible) -> bool?
|
|
77
119
|
def show_sheet_tabs: (?bool? visible) -> bool?
|
|
78
120
|
|
|
79
|
-
|
|
121
|
+
# Sets whether sheet tabs are visible in the workbook window.
|
|
122
|
+
#
|
|
123
|
+
# @param visible [Boolean, nil]
|
|
124
|
+
# @return [Boolean, nil]
|
|
125
|
+
# @api public
|
|
126
|
+
attr_writer show_sheet_tabs: bool?
|
|
80
127
|
|
|
81
128
|
# Gets or sets the ratio between the sheet tabs bar and the horizontal scroll bar (0-1000).
|
|
82
129
|
#
|
|
130
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#tab_ratio=} instead.
|
|
83
131
|
# @param ratio [Integer, nil]
|
|
84
132
|
# @return [Integer, nil]
|
|
85
133
|
# @api public
|
|
86
134
|
# : (?Integer? ratio) -> Integer?
|
|
87
135
|
def tab_ratio: (?Integer? ratio) -> Integer?
|
|
88
136
|
|
|
89
|
-
|
|
137
|
+
# Sets the ratio between the sheet tabs bar and the horizontal scroll bar (0-1000).
|
|
138
|
+
#
|
|
139
|
+
# @param ratio [Integer, nil]
|
|
140
|
+
# @return [Integer, nil]
|
|
141
|
+
# @api public
|
|
142
|
+
attr_writer tab_ratio: Integer?
|
|
90
143
|
|
|
91
144
|
# Sets a workbook property.
|
|
92
145
|
#
|
|
@@ -100,6 +153,21 @@ module Xlsxrb
|
|
|
100
153
|
# : (Symbol name, String | Integer | bool value) -> void
|
|
101
154
|
def workbook_property: (Symbol name, String | Integer | bool value) -> void
|
|
102
155
|
|
|
156
|
+
# Returns workbook-level properties.
|
|
157
|
+
#
|
|
158
|
+
# @return [Elements::WorkbookProperties]
|
|
159
|
+
# @api public
|
|
160
|
+
# : () -> Elements::WorkbookProperties
|
|
161
|
+
def workbook_properties: () -> Elements::WorkbookProperties
|
|
162
|
+
|
|
163
|
+
# Sets workbook-level properties.
|
|
164
|
+
#
|
|
165
|
+
# @param props [Hash, Elements::MetadataRecord]
|
|
166
|
+
# @return [void]
|
|
167
|
+
# @api public
|
|
168
|
+
# : (untyped props) -> void
|
|
169
|
+
def workbook_properties=: (untyped props) -> void
|
|
170
|
+
|
|
103
171
|
# Defines or configures a named cell style.
|
|
104
172
|
#
|
|
105
173
|
# @param name [String, Symbol] The name of the style.
|
|
@@ -120,8 +188,34 @@ module Xlsxrb
|
|
|
120
188
|
# : (?String | Hash[Symbol, untyped]? name, ?Float | Integer | nil size, **untyped opts) -> void
|
|
121
189
|
def default_font: (?String | Hash[Symbol, untyped]? name, ?Float | Integer | nil size, **untyped opts) -> void
|
|
122
190
|
|
|
191
|
+
# @deprecated Use {#default_font} instead. Will be removed in 0.2.0.
|
|
123
192
|
alias set_default_font default_font
|
|
124
193
|
|
|
194
|
+
# Creates an {Elements::Formula} object.
|
|
195
|
+
# @api public
|
|
196
|
+
# : (String expression, ?cached_value: (String | Numeric | bool | Elements::CellError | nil), ?type: (Symbol | String)?, ?ref: String?, ?shared_index: Integer?) -> Elements::Formula
|
|
197
|
+
def formula: (String expression, ?cached_value: String | Numeric | bool | Elements::CellError | nil, ?type: (Symbol | String)?, ?ref: String?, ?shared_index: Integer?) -> Elements::Formula
|
|
198
|
+
|
|
199
|
+
# Creates an array or dynamic array {Elements::Formula} object.
|
|
200
|
+
# @api public
|
|
201
|
+
# : (String expression, ?ref: String?, ?cached_value: (String | Numeric | bool | Elements::CellError | nil), **untyped attrs) -> Elements::Formula
|
|
202
|
+
def array_formula: (String expression, ?ref: String?, ?cached_value: String | Numeric | bool | Elements::CellError | nil, **untyped attrs) -> Elements::Formula
|
|
203
|
+
|
|
204
|
+
# Creates a shared formula {Elements::Formula} object.
|
|
205
|
+
# @api public
|
|
206
|
+
# : (?String? expression, ?shared_index: Integer?, ?ref: String?, ?cached_value: (String | Numeric | bool | Elements::CellError | nil)) -> Elements::Formula
|
|
207
|
+
def shared_formula: (?String? expression, ?shared_index: Integer?, ?ref: String?, ?cached_value: String | Numeric | bool | Elements::CellError | nil) -> Elements::Formula
|
|
208
|
+
|
|
209
|
+
# Creates an {Elements::RichText} object.
|
|
210
|
+
# @api public
|
|
211
|
+
# : (*(Hash[Symbol, untyped] | Elements::RichTextRun | String | Array[untyped] | untyped) runs, ?text: String?, ?base_font: untyped, **untyped font_props) -> Elements::RichText
|
|
212
|
+
def rich_text: (*Hash[Symbol, untyped] | Elements::RichTextRun | String | Array[untyped] | untyped runs, ?text: String?, ?base_font: untyped, **untyped font_props) -> Elements::RichText
|
|
213
|
+
|
|
214
|
+
# Creates or returns an {Elements::CellError} object.
|
|
215
|
+
# @api public
|
|
216
|
+
# : (String | Symbol | Elements::CellError code) -> Elements::CellError
|
|
217
|
+
def cell_error: (String | Symbol | Elements::CellError code) -> Elements::CellError
|
|
218
|
+
|
|
125
219
|
# Proxy object yielded by the `sheet` method to prevent writing to inactive sheets in streaming mode.
|
|
126
220
|
#
|
|
127
221
|
# @api public
|
|
@@ -140,8 +234,48 @@ module Xlsxrb
|
|
|
140
234
|
# : (?String | Hash[Symbol, untyped]? name, ?Float | Integer | nil size, **untyped opts) -> void
|
|
141
235
|
def default_font: (?String | Hash[Symbol, untyped]? name, ?Float | Integer | nil size, **untyped opts) -> void
|
|
142
236
|
|
|
237
|
+
# @deprecated Use {#default_font} instead. Will be removed in 0.2.0.
|
|
143
238
|
alias set_default_font default_font
|
|
144
239
|
|
|
240
|
+
# Creates an {Elements::Formula} object.
|
|
241
|
+
# @api public
|
|
242
|
+
# : (String expression, ?cached_value: (String | Numeric | bool | Elements::CellError | nil), ?type: (Symbol | String)?, ?ref: String?, ?shared_index: Integer?) -> Elements::Formula
|
|
243
|
+
def formula: (String expression, ?cached_value: String | Numeric | bool | Elements::CellError | nil, ?type: (Symbol | String)?, ?ref: String?, ?shared_index: Integer?) -> Elements::Formula
|
|
244
|
+
|
|
245
|
+
# Creates an array or dynamic array {Elements::Formula} object.
|
|
246
|
+
# @api public
|
|
247
|
+
# : (String expression, ?ref: String?, ?cached_value: (String | Numeric | bool | Elements::CellError | nil), **untyped attrs) -> Elements::Formula
|
|
248
|
+
def array_formula: (String expression, ?ref: String?, ?cached_value: String | Numeric | bool | Elements::CellError | nil, **untyped attrs) -> Elements::Formula
|
|
249
|
+
|
|
250
|
+
# Creates a shared formula {Elements::Formula} object.
|
|
251
|
+
# @api public
|
|
252
|
+
# : (?String? expression, ?shared_index: Integer?, ?ref: String?, ?cached_value: (String | Numeric | bool | Elements::CellError | nil)) -> Elements::Formula
|
|
253
|
+
def shared_formula: (?String? expression, ?shared_index: Integer?, ?ref: String?, ?cached_value: String | Numeric | bool | Elements::CellError | nil) -> Elements::Formula
|
|
254
|
+
|
|
255
|
+
# Creates an {Elements::RichText} object.
|
|
256
|
+
# @api public
|
|
257
|
+
# : (*(Hash[Symbol, untyped] | Elements::RichTextRun | String | Array[untyped] | untyped) runs, ?text: String?, ?base_font: untyped, **untyped font_props) -> Elements::RichText
|
|
258
|
+
def rich_text: (*Hash[Symbol, untyped] | Elements::RichTextRun | String | Array[untyped] | untyped runs, ?text: String?, ?base_font: untyped, **untyped font_props) -> Elements::RichText
|
|
259
|
+
|
|
260
|
+
# Creates or returns an {Elements::CellError} object.
|
|
261
|
+
# @api public
|
|
262
|
+
# : (String | Symbol | Elements::CellError code) -> Elements::CellError
|
|
263
|
+
def cell_error: (String | Symbol | Elements::CellError code) -> Elements::CellError
|
|
264
|
+
|
|
265
|
+
# Returns the worksheet name.
|
|
266
|
+
#
|
|
267
|
+
# @return [String]
|
|
268
|
+
# @api public
|
|
269
|
+
# : () -> String
|
|
270
|
+
def name: () -> String
|
|
271
|
+
|
|
272
|
+
# Returns column configurations defined for this worksheet.
|
|
273
|
+
#
|
|
274
|
+
# @return [Array<Elements::Column>]
|
|
275
|
+
# @api public
|
|
276
|
+
# : () -> Array[Elements::Column]
|
|
277
|
+
def columns: () -> Array[Elements::Column]
|
|
278
|
+
|
|
145
279
|
# Returns the list of worksheet names created in this workbook so far.
|
|
146
280
|
#
|
|
147
281
|
# @return [Array<String>] Worksheet names.
|
|
@@ -149,6 +283,25 @@ module Xlsxrb
|
|
|
149
283
|
# : () -> Array[String]
|
|
150
284
|
def sheet_names: () -> Array[String]
|
|
151
285
|
|
|
286
|
+
# Returns whether formula escaping is enabled.
|
|
287
|
+
#
|
|
288
|
+
# @return [Boolean]
|
|
289
|
+
# @api public
|
|
290
|
+
# : () -> bool
|
|
291
|
+
def escape_formulas?: () -> bool
|
|
292
|
+
|
|
293
|
+
# @return [Boolean] Whether to treat strings starting with formula prefixes as plain text.
|
|
294
|
+
# : bool
|
|
295
|
+
def escape_formulas: () -> untyped
|
|
296
|
+
|
|
297
|
+
# Sets whether to treat strings starting with formula prefixes as plain text.
|
|
298
|
+
#
|
|
299
|
+
# @param val [Boolean]
|
|
300
|
+
# @return [Boolean]
|
|
301
|
+
# @api public
|
|
302
|
+
# : (bool val) -> bool
|
|
303
|
+
def escape_formulas=: (bool val) -> bool
|
|
304
|
+
|
|
152
305
|
# Defines or configures a named cell style on the active sheet.
|
|
153
306
|
#
|
|
154
307
|
# @example
|
|
@@ -168,10 +321,8 @@ module Xlsxrb
|
|
|
168
321
|
# @example Merge with cell reference string
|
|
169
322
|
# s.merge("A1:C1")
|
|
170
323
|
#
|
|
171
|
-
# @
|
|
172
|
-
#
|
|
173
|
-
#
|
|
174
|
-
# @param range [String, nil] The cell range (e.g. "A1:B2").
|
|
324
|
+
# @deprecated Passing coordinate keyword arguments (row:, col_start:, col_end:, row_start:, row_end:) is deprecated and will be removed in 0.2.0. Use a range string (e.g. merge("A1:C1")) instead.
|
|
325
|
+
# @param range [String, Hash, nil] The cell range (e.g. "A1:B2").
|
|
175
326
|
# @param row [Integer, nil] 0-based row index.
|
|
176
327
|
# @param col_start [Integer, String, nil] 0-based start column index or letter.
|
|
177
328
|
# @param col_end [Integer, String, nil] 0-based end column index or letter.
|
|
@@ -179,8 +330,8 @@ module Xlsxrb
|
|
|
179
330
|
# @param row_end [Integer, nil] 0-based end row index.
|
|
180
331
|
# @return [void]
|
|
181
332
|
# @api public
|
|
182
|
-
# : (?String? range, ?row: Integer | nil, ?col_start: (Integer | String)?, ?col_end: (Integer | String)?, ?row_start: Integer | nil, ?row_end: Integer | nil) -> void
|
|
183
|
-
def merge: (?String? range, ?row: Integer | nil, ?col_start: (Integer | String)?, ?col_end: (Integer | String)?, ?row_start: Integer | nil, ?row_end: Integer | nil) -> void
|
|
333
|
+
# : (?(String | Hash[Symbol, Integer | String])? range, ?row: Integer | nil, ?col_start: (Integer | String)?, ?col_end: (Integer | String)?, ?row_start: Integer | nil, ?row_end: Integer | nil) -> void
|
|
334
|
+
def merge: (?(String | Hash[Symbol, Integer | String])? range, ?row: Integer | nil, ?col_start: (Integer | String)?, ?col_end: (Integer | String)?, ?row_start: Integer | nil, ?row_end: Integer | nil) -> void
|
|
184
335
|
|
|
185
336
|
# Adds a drawing shape to the sheet.
|
|
186
337
|
#
|
|
@@ -189,18 +340,21 @@ module Xlsxrb
|
|
|
189
340
|
#
|
|
190
341
|
# @param preset [String] Preset shape type (e.g. "rect", "ellipse").
|
|
191
342
|
# @param text [String, nil] Shape label text.
|
|
192
|
-
# @param
|
|
343
|
+
# @param from_column [Integer, nil] Starting column index (0-based).
|
|
344
|
+
# @param from_col [Integer, nil] Deprecated alias for from_column.
|
|
193
345
|
# @param from_row [Integer] Starting row index (0-based).
|
|
194
|
-
# @param
|
|
346
|
+
# @param to_column [Integer, nil] Ending column index (0-based).
|
|
347
|
+
# @param to_col [Integer, nil] Deprecated alias for to_column.
|
|
195
348
|
# @param to_row [Integer] Ending row index (0-based).
|
|
196
349
|
# @param opts [Hash] Additional shape formatting options.
|
|
197
350
|
# @return [void]
|
|
198
351
|
# @api public
|
|
199
|
-
# : (?preset: String, ?text: String?, ?from_col: Integer
|
|
200
|
-
def shape: (?preset: String, ?text: String?, ?from_col: Integer
|
|
352
|
+
# : (?preset: String, ?text: String?, ?from_column: Integer?, ?from_col: Integer?, ?from_row: Integer, ?to_column: Integer?, ?to_col: Integer?, ?to_row: Integer, **untyped opts) -> void
|
|
353
|
+
def shape: (?preset: String, ?text: String?, ?from_column: Integer?, ?from_col: Integer?, ?from_row: Integer, ?to_column: Integer?, ?to_col: Integer?, ?to_row: Integer, **untyped opts) -> void
|
|
201
354
|
|
|
202
355
|
# simplecov:disable
|
|
203
356
|
# Edge case / untested delegation block
|
|
357
|
+
# @api private
|
|
204
358
|
# : (*untyped args, **untyped kwargs) ?{ (*untyped) -> untyped } -> untyped
|
|
205
359
|
def internal_sheet_setup: (*untyped args, **untyped kwargs) ?{ (*untyped) -> untyped } -> untyped
|
|
206
360
|
|
|
@@ -210,21 +364,24 @@ module Xlsxrb
|
|
|
210
364
|
# s.row(["Name", "Age", "City"])
|
|
211
365
|
#
|
|
212
366
|
# @example Write with explicit column keys and styles
|
|
213
|
-
# s.row({ A: "Header", C: 100 },
|
|
367
|
+
# s.row({ A: "Header", C: 100 }, cell_styles: { A: :bold })
|
|
214
368
|
#
|
|
215
369
|
# @param values [Array, Hash] The cell values (e.g. `[1, 2, 3]` or `{ A: 1, C: 3 }`).
|
|
216
|
-
# @param
|
|
370
|
+
# @param cell_styles [String, Symbol, Array, Hash, nil] Style names or hashes to apply to cells.
|
|
371
|
+
# @param row_style [Integer, Symbol, String, Hash, nil] Row style format or index.
|
|
217
372
|
# @param height [Float, Integer, nil] The row height in points (0 - 409).
|
|
218
373
|
# @param hidden [Boolean] Whether the row is hidden.
|
|
219
374
|
# @param custom_height [Boolean] Whether to flag as custom height.
|
|
220
375
|
# @param outline_level [Integer, nil] Grouping/outline level (0 - 7).
|
|
221
376
|
# @param collapsed [Boolean] Whether the row is collapsed.
|
|
222
|
-
# @param
|
|
377
|
+
# @param styles [String, Symbol, Array, Hash, nil] Deprecated. Use cell_styles: instead.
|
|
378
|
+
# @param style [Integer, Symbol, String, Hash, nil] Deprecated. Use row_style: instead.
|
|
223
379
|
# @return [void]
|
|
224
380
|
# @api public
|
|
225
|
-
# : (Array[untyped] | Hash[untyped, untyped] values, ?styles: untyped, ?height: Float | Integer | nil, ?hidden: bool, ?custom_height: bool, ?collapsed: bool, ?outline_level: Integer | nil
|
|
226
|
-
def row: (Array[untyped] | Hash[untyped, untyped] values, ?styles: untyped, ?height: Float | Integer | nil, ?hidden: bool, ?custom_height: bool, ?collapsed: bool, ?outline_level: Integer | nil
|
|
381
|
+
# : (Array[untyped] | Hash[untyped, untyped] values, ?cell_styles: untyped, ?row_style: untyped, ?styles: untyped, ?style: untyped, ?height: Float | Integer | nil, ?hidden: bool, ?custom_height: bool, ?collapsed: bool, ?outline_level: Integer | nil) -> void
|
|
382
|
+
def row: (Array[untyped] | Hash[untyped, untyped] values, ?cell_styles: untyped, ?row_style: untyped, ?styles: untyped, ?style: untyped, ?height: Float | Integer | nil, ?hidden: bool, ?custom_height: bool, ?collapsed: bool, ?outline_level: Integer | nil) -> void
|
|
227
383
|
|
|
384
|
+
# @deprecated Use {#row} instead. Will be removed in 0.2.0.
|
|
228
385
|
alias add_row row
|
|
229
386
|
|
|
230
387
|
# Appends a row to the worksheet and returns self for chaining.
|
|
@@ -252,6 +409,7 @@ module Xlsxrb
|
|
|
252
409
|
# : (?Integer count) -> void
|
|
253
410
|
def skip_rows: (?Integer count) -> void
|
|
254
411
|
|
|
412
|
+
# @deprecated Use {#skip_rows} instead. Will be removed in 0.2.0.
|
|
255
413
|
alias skip_row skip_rows
|
|
256
414
|
|
|
257
415
|
# Configures column width and properties.
|
|
@@ -259,18 +417,18 @@ module Xlsxrb
|
|
|
259
417
|
# @example Set column A width
|
|
260
418
|
# s.column(0, width: 25.0)
|
|
261
419
|
#
|
|
262
|
-
# @param
|
|
420
|
+
# @param index [Integer, String, Symbol, Range, Array] 0-based column index, letter ("A", :A), range, or array.
|
|
263
421
|
# @param width [Float, Integer, nil] Column width in characters.
|
|
264
422
|
# @param hidden [Boolean] Whether the column is hidden.
|
|
265
|
-
# @param best_fit [Boolean] Whether the column automatically fits content.
|
|
266
423
|
# @param custom_width [Boolean] Whether to flag as custom width.
|
|
267
424
|
# @param outline_level [Integer, nil] Grouping/outline level (0 - 7).
|
|
268
425
|
# @param collapsed [Boolean] Whether the outline group is collapsed.
|
|
269
426
|
# @param style [Integer, Symbol, String, Hash, nil] Column style format or index.
|
|
427
|
+
# @param best_fit [Boolean] Whether the column automatically fits content.
|
|
270
428
|
# @return [void]
|
|
271
429
|
# @api public
|
|
272
|
-
# : (Integer | String | Symbol | Range[Integer | String] | Array[Integer | String]
|
|
273
|
-
def column: (Integer | String | Symbol | Range[Integer | String] | Array[Integer | String]
|
|
430
|
+
# : (Integer | String | Symbol | Range[Integer | String | Symbol] | Array[Integer | String | Symbol] index, ?width: Float | Integer | nil, ?hidden: bool, ?custom_width: bool, ?outline_level: Integer | nil, ?collapsed: bool, ?style: (Integer | Symbol | String | Hash[Symbol, untyped])?, ?best_fit: bool) -> void
|
|
431
|
+
def column: (Integer | String | Symbol | Range[Integer | String | Symbol] | Array[Integer | String | Symbol] index, ?width: Float | Integer | nil, ?hidden: bool, ?custom_width: bool, ?outline_level: Integer | nil, ?collapsed: bool, ?style: (Integer | Symbol | String | Hash[Symbol, untyped])?, ?best_fit: bool) -> void
|
|
274
432
|
|
|
275
433
|
# Groups multiple columns together with outline hierarchy.
|
|
276
434
|
#
|
|
@@ -285,10 +443,13 @@ module Xlsxrb
|
|
|
285
443
|
# : (Integer | String | Range[Integer | String] | Array[Integer | String] index, ?level: Integer, ?collapsed: bool, ?hidden: bool, ?width: Float | Integer | nil, ?style: untyped) -> void
|
|
286
444
|
def group_columns: (Integer | String | Range[Integer | String] | Array[Integer | String] index, ?level: Integer, ?collapsed: bool, ?hidden: bool, ?width: Float | Integer | nil, ?style: untyped) -> void
|
|
287
445
|
|
|
446
|
+
# @deprecated Use {#group_columns} instead. Will be removed in 0.2.0.
|
|
288
447
|
alias group_column group_columns
|
|
289
448
|
|
|
449
|
+
# @deprecated Use {#group_columns} instead. Will be removed in 0.2.0.
|
|
290
450
|
alias group_cols group_columns
|
|
291
451
|
|
|
452
|
+
# @deprecated Use {#group_columns} instead. Will be removed in 0.2.0.
|
|
292
453
|
alias group_col group_columns
|
|
293
454
|
|
|
294
455
|
# Groups multiple rows with outline hierarchy with a block.
|
|
@@ -303,6 +464,7 @@ module Xlsxrb
|
|
|
303
464
|
# : (?untyped rows, ?level: Integer, ?collapsed: bool, ?hidden: bool) ?{ (self) -> void } -> void
|
|
304
465
|
def group_rows: (?untyped rows, ?level: Integer, ?collapsed: bool, ?hidden: bool) ?{ (self) -> void } -> void
|
|
305
466
|
|
|
467
|
+
# @deprecated Use {#group_rows} instead. Will be removed in 0.2.0.
|
|
306
468
|
alias group_row group_rows
|
|
307
469
|
|
|
308
470
|
# Configures worksheet-level outline and grouping view properties.
|
|
@@ -310,16 +472,27 @@ module Xlsxrb
|
|
|
310
472
|
# @param summary_below [Boolean, nil] Summary rows below detail rows.
|
|
311
473
|
# @param summary_right [Boolean, nil] Summary columns to the right of detail columns.
|
|
312
474
|
# @param show_outline_symbols [Boolean, nil] Outline symbols visible.
|
|
313
|
-
# @param show_symbols [Boolean, nil]
|
|
475
|
+
# @param show_symbols [Boolean, nil] Deprecated alias for show_outline_symbols.
|
|
314
476
|
# @param apply_styles [Boolean, nil] Automatic styles applied.
|
|
315
477
|
# @param opts [Hash] Additional options.
|
|
316
|
-
# @return [
|
|
478
|
+
# @return [void]
|
|
317
479
|
# @api public
|
|
318
|
-
# : (?summary_below: bool?, ?summary_right: bool?, ?show_outline_symbols: bool?, ?show_symbols: bool?, ?apply_styles: bool?, **untyped opts) ->
|
|
319
|
-
def outline_properties: (?summary_below: bool?, ?summary_right: bool?, ?show_outline_symbols: bool?, ?show_symbols: bool?, ?apply_styles: bool?, **untyped opts) ->
|
|
480
|
+
# : (?summary_below: bool?, ?summary_right: bool?, ?show_outline_symbols: bool?, ?show_symbols: bool?, ?apply_styles: bool?, **untyped opts) -> void
|
|
481
|
+
def outline_properties: (?summary_below: bool?, ?summary_right: bool?, ?show_outline_symbols: bool?, ?show_symbols: bool?, ?apply_styles: bool?, **untyped opts) -> void
|
|
320
482
|
|
|
483
|
+
# @deprecated Use {#outline_properties} instead. Will be removed in 0.2.0.
|
|
321
484
|
alias outline_pr outline_properties
|
|
322
485
|
|
|
486
|
+
# Sets worksheet outline and grouping view properties.
|
|
487
|
+
#
|
|
488
|
+
# @param opts [Hash] Outline properties.
|
|
489
|
+
# @return [void]
|
|
490
|
+
# @api public
|
|
491
|
+
# : (Hash[Symbol, untyped] opts) -> void
|
|
492
|
+
def outline_properties=: (Hash[Symbol, untyped] opts) -> void
|
|
493
|
+
|
|
494
|
+
alias outline_pr= outline_properties=
|
|
495
|
+
|
|
323
496
|
# Adds a chart to the active sheet.
|
|
324
497
|
#
|
|
325
498
|
# @example
|
|
@@ -329,13 +502,13 @@ module Xlsxrb
|
|
|
329
502
|
# end
|
|
330
503
|
#
|
|
331
504
|
# @param type [Symbol, String, nil] The chart type (:bar, :col, :line, :pie, :scatter, :area, :doughnut, :radar).
|
|
332
|
-
# @param
|
|
505
|
+
# @param options [Hash] Additional chart options.
|
|
333
506
|
# @yield [chart_builder]
|
|
334
507
|
# @yieldparam chart_builder [Xlsxrb::ChartBuilder]
|
|
335
508
|
# @return [void]
|
|
336
509
|
# @api public
|
|
337
|
-
# : (?Symbol | String? type, **untyped
|
|
338
|
-
def chart: (?Symbol | String? type, **untyped
|
|
510
|
+
# : (?Symbol | String? type, **untyped options) ?{ (ChartBuilder) -> void } -> void
|
|
511
|
+
def chart: (?Symbol | String? type, **untyped options) ?{ (ChartBuilder) -> void } -> void
|
|
339
512
|
|
|
340
513
|
# Adds a hyperlink to a cell.
|
|
341
514
|
#
|
|
@@ -360,23 +533,31 @@ module Xlsxrb
|
|
|
360
533
|
# @example
|
|
361
534
|
# s.auto_filter("A1:D100")
|
|
362
535
|
#
|
|
363
|
-
# @param
|
|
536
|
+
# @param range [String, nil] The cell range (e.g. "A1:D10").
|
|
364
537
|
# @return [void]
|
|
365
538
|
# @api public
|
|
366
|
-
# : (String
|
|
367
|
-
def auto_filter: (String
|
|
539
|
+
# : (String? range) -> void
|
|
540
|
+
def auto_filter: (String? range) -> void
|
|
541
|
+
|
|
542
|
+
# Sets the auto-filter range on the active sheet.
|
|
543
|
+
#
|
|
544
|
+
# @param range [String, nil] The cell range (e.g. "A1:D10").
|
|
545
|
+
# @return [String, nil]
|
|
546
|
+
# @api public
|
|
547
|
+
# : (String? range) -> String?
|
|
548
|
+
def auto_filter=: (String? range) -> String?
|
|
368
549
|
|
|
369
550
|
# Sets filter criteria for a column in the auto-filter.
|
|
370
551
|
#
|
|
371
552
|
# @example Simple values filter
|
|
372
553
|
# s.filter_column(0, ["Active", "Pending"])
|
|
373
554
|
#
|
|
374
|
-
# @param col_id [Integer] 0-based column index relative to auto-filter range.
|
|
375
|
-
# @param
|
|
555
|
+
# @param col_id [Integer, String, Symbol] 0-based column index relative to auto-filter range or column letter.
|
|
556
|
+
# @param filter [Hash] Values or filter specification hash.
|
|
376
557
|
# @return [void]
|
|
377
558
|
# @api public
|
|
378
|
-
# : (Integer
|
|
379
|
-
def filter_column: (Integer
|
|
559
|
+
# : (Integer | String | Symbol col_id, Hash[untyped, untyped] filter) -> void
|
|
560
|
+
def filter_column: (Integer | String | Symbol col_id, Hash[untyped, untyped] filter) -> void
|
|
380
561
|
|
|
381
562
|
# Configures sort state on a range.
|
|
382
563
|
#
|
|
@@ -384,22 +565,28 @@ module Xlsxrb
|
|
|
384
565
|
# s.sort_state("A1:A10", [{ ref: "A1:A10", descending: true }])
|
|
385
566
|
#
|
|
386
567
|
# @param ref [String] The range to sort.
|
|
387
|
-
# @param sort_conditions [Array<Hash
|
|
568
|
+
# @param sort_conditions [Array<Hash>] Sort conditions array.
|
|
388
569
|
# @param opts [Hash] Additional sort options.
|
|
389
570
|
# @return [void]
|
|
390
571
|
# @api public
|
|
391
|
-
# : (String ref, Array[Hash[
|
|
392
|
-
def sort_state: (String ref, Array[Hash[
|
|
572
|
+
# : (String ref, Array[Hash[untyped, untyped]] sort_conditions, **untyped opts) -> void
|
|
573
|
+
def sort_state: (String ref, Array[Hash[untyped, untyped]] sort_conditions, **untyped opts) -> void
|
|
393
574
|
|
|
394
|
-
#
|
|
575
|
+
# Sets column sort state for the sheet.
|
|
395
576
|
#
|
|
396
|
-
#
|
|
577
|
+
# @param opts [Elements::SortState, Hash, nil] Sort state options.
|
|
578
|
+
# @return [void]
|
|
579
|
+
# @api public
|
|
580
|
+
# : (untyped opts) -> void
|
|
581
|
+
def sort_state=: (untyped opts) -> void
|
|
582
|
+
|
|
583
|
+
# Adds data validation rules to a range.
|
|
397
584
|
#
|
|
398
585
|
# @example Dropdown list validation
|
|
399
|
-
# s.
|
|
586
|
+
# s.data_validation("B2:B100", type: "list", formula1: '"High,Medium,Low"')
|
|
400
587
|
#
|
|
401
588
|
# @example Block syntax
|
|
402
|
-
# s.
|
|
589
|
+
# s.data_validation("B2:B100") do |dv|
|
|
403
590
|
# dv.type :list
|
|
404
591
|
# dv.formula1 '"High,Medium,Low"'
|
|
405
592
|
# end
|
|
@@ -411,6 +598,10 @@ module Xlsxrb
|
|
|
411
598
|
# @return [void]
|
|
412
599
|
# @api public
|
|
413
600
|
# : (?String? range, ?type: (String | Symbol)?, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
601
|
+
def data_validation: (?String? range, ?type: (String | Symbol)?, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
602
|
+
|
|
603
|
+
# @deprecated Use {#data_validation} instead.
|
|
604
|
+
# : (?String? range, ?type: (String | Symbol)?, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
414
605
|
def validate_data: (?String? range, ?type: (String | Symbol)?, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
415
606
|
|
|
416
607
|
# Adds conditional formatting to a range.
|
|
@@ -458,6 +649,7 @@ module Xlsxrb
|
|
|
458
649
|
|
|
459
650
|
# simplecov:disable
|
|
460
651
|
# Edge case / untested delegation block
|
|
652
|
+
# @api private
|
|
461
653
|
# : () -> void
|
|
462
654
|
def cleanup!: () -> void
|
|
463
655
|
|
|
@@ -485,6 +677,7 @@ module Xlsxrb
|
|
|
485
677
|
# : (String | Integer cell, String text, ?author: untyped, ?timestamp: untyped, ?id: String?, ?parent_id: String?, ?done: bool?, ?user_id: String?, ?provider_id: String?) -> void
|
|
486
678
|
def threaded_comment: (String | Integer cell, String text, ?author: untyped, ?timestamp: untyped, ?id: String?, ?parent_id: String?, ?done: bool?, ?user_id: String?, ?provider_id: String?) -> void
|
|
487
679
|
|
|
680
|
+
# @deprecated Use {#threaded_comment} instead. Will be removed in 0.2.0.
|
|
488
681
|
alias add_threaded_comment threaded_comment
|
|
489
682
|
|
|
490
683
|
# Adds a Pivot Table to the sheet.
|
|
@@ -492,16 +685,18 @@ module Xlsxrb
|
|
|
492
685
|
# @param source_ref [String] Source data range reference (e.g. "Sheet1!A1:D100").
|
|
493
686
|
# @param row_fields [Array<String>] Field names for rows.
|
|
494
687
|
# @param data_fields [Array<String>] Field names for data values.
|
|
495
|
-
# @param
|
|
496
|
-
# @param
|
|
688
|
+
# @param column_fields [Array<String>] Field names for columns.
|
|
689
|
+
# @param col_fields [Array<String>] Deprecated alias for column_fields.
|
|
690
|
+
# @param ref [String] Target top-left cell reference (default: "E1").
|
|
691
|
+
# @param dest_ref [String] Deprecated alias for ref.
|
|
497
692
|
# @param name [String, nil] Pivot table name.
|
|
498
693
|
# @param field_names [Array<String>, nil] Override field names.
|
|
499
694
|
# @param items [Array, nil] Items configuration.
|
|
500
695
|
# @param opts [Hash] Additional options.
|
|
501
696
|
# @return [void]
|
|
502
697
|
# @api public
|
|
503
|
-
# : (String source_ref, row_fields: untyped, data_fields: untyped, ?col_fields: untyped, ?dest_ref: String
|
|
504
|
-
def pivot_table: (String source_ref, row_fields: untyped, data_fields: untyped, ?col_fields: untyped, ?dest_ref: String
|
|
698
|
+
# : (String source_ref, row_fields: untyped, data_fields: untyped, ?column_fields: untyped, ?col_fields: untyped, ?ref: String?, ?dest_ref: String?, ?name: String?, ?field_names: untyped, ?items: untyped, **untyped opts) -> void
|
|
699
|
+
def pivot_table: (String source_ref, row_fields: untyped, data_fields: untyped, ?column_fields: untyped, ?col_fields: untyped, ?ref: String?, ?dest_ref: String?, ?name: String?, ?field_names: untyped, ?items: untyped, **untyped opts) -> void
|
|
505
700
|
|
|
506
701
|
# Adds sparklines to the sheet.
|
|
507
702
|
#
|
|
@@ -531,6 +726,7 @@ module Xlsxrb
|
|
|
531
726
|
# @param range [String, nil] Data range for the sparkline (e.g. "A1:E1").
|
|
532
727
|
# @param type [Symbol, String, nil] Sparkline type (:line, :column, :win_loss / :stacked).
|
|
533
728
|
# @param opts [Hash] Additional sparkline options.
|
|
729
|
+
# @deprecated Use {#sparkline_group} instead. Will be removed in 0.2.0.
|
|
534
730
|
# @return [void]
|
|
535
731
|
# @api public
|
|
536
732
|
# : (?location: String?, ?range: String?, ?type: (String | Symbol)?, **untyped opts) -> void
|
|
@@ -538,57 +734,108 @@ module Xlsxrb
|
|
|
538
734
|
|
|
539
735
|
# Sets workbook-level properties.
|
|
540
736
|
#
|
|
541
|
-
# @param
|
|
737
|
+
# @param name [Symbol] Workbook property name.
|
|
738
|
+
# @param value [String, Integer, Boolean] Property value.
|
|
542
739
|
# @return [void]
|
|
543
740
|
# @api public
|
|
544
|
-
# : (
|
|
545
|
-
def workbook_property: (
|
|
741
|
+
# : (Symbol name, String | Integer | bool value) -> void
|
|
742
|
+
def workbook_property: (Symbol name, String | Integer | bool value) -> void
|
|
546
743
|
|
|
547
744
|
# Sets or gets the active sheet in the workbook window.
|
|
548
745
|
# If called without arguments on the proxy, marks this sheet as the active sheet.
|
|
549
746
|
#
|
|
747
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#active_sheet=} instead.
|
|
550
748
|
# @param name_or_index [String, Symbol, Integer, nil]
|
|
551
749
|
# @return [String, Symbol, Integer, nil]
|
|
552
750
|
# @api public
|
|
553
751
|
# : (?String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
554
752
|
def active_sheet: (?String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
555
753
|
|
|
754
|
+
# @deprecated Use {#active_sheet} instead. Will be removed in 0.2.0.
|
|
556
755
|
alias active_tab active_sheet
|
|
557
756
|
|
|
757
|
+
# Sets the active worksheet tab in the workbook window.
|
|
758
|
+
#
|
|
759
|
+
# @param name_or_index [String, Symbol, Integer, nil] Sheet name or 0-based sheet index.
|
|
760
|
+
# @return [String, Symbol, Integer, nil]
|
|
761
|
+
# @api public
|
|
762
|
+
# : (String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
763
|
+
def active_sheet=: (String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
764
|
+
|
|
765
|
+
# @deprecated Use {#active_sheet=} instead. Will be removed in 0.2.0.
|
|
766
|
+
alias active_tab= active_sheet=
|
|
767
|
+
|
|
558
768
|
# Sets or gets the first visible sheet in the tab bar.
|
|
559
769
|
#
|
|
770
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#first_sheet=} instead.
|
|
560
771
|
# @param name_or_index [String, Symbol, Integer, nil]
|
|
561
772
|
# @return [String, Symbol, Integer, nil]
|
|
562
773
|
# @api public
|
|
563
774
|
# : (?String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
564
775
|
def first_sheet: (?String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
565
776
|
|
|
777
|
+
# Sets the first visible sheet in the tab bar.
|
|
778
|
+
#
|
|
779
|
+
# @param name_or_index [String, Symbol, Integer, nil] Sheet name or 0-based sheet index.
|
|
780
|
+
# @return [String, Symbol, Integer, nil]
|
|
781
|
+
# @api public
|
|
782
|
+
# : (String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
783
|
+
def first_sheet=: (String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
784
|
+
|
|
566
785
|
# Sets or gets whether sheet tabs are visible in the workbook window.
|
|
567
786
|
#
|
|
787
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#show_sheet_tabs=} instead.
|
|
568
788
|
# @param visible [Boolean, nil]
|
|
569
789
|
# @return [Boolean, nil]
|
|
570
790
|
# @api public
|
|
571
791
|
# : (?bool? visible) -> bool?
|
|
572
792
|
def show_sheet_tabs: (?bool? visible) -> bool?
|
|
573
793
|
|
|
794
|
+
# Sets whether sheet tabs are visible in the workbook window.
|
|
795
|
+
#
|
|
796
|
+
# @param visible [Boolean, nil]
|
|
797
|
+
# @return [Boolean, nil]
|
|
798
|
+
# @api public
|
|
799
|
+
# : (bool? visible) -> bool?
|
|
800
|
+
def show_sheet_tabs=: (bool? visible) -> bool?
|
|
801
|
+
|
|
574
802
|
# Sets or gets the tab ratio between tab bar and horizontal scrollbar (0-1000).
|
|
575
803
|
#
|
|
804
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#tab_ratio=} instead.
|
|
576
805
|
# @param ratio [Integer, nil]
|
|
577
806
|
# @return [Integer, nil]
|
|
578
807
|
# @api public
|
|
579
808
|
# : (?Integer? ratio) -> Integer?
|
|
580
809
|
def tab_ratio: (?Integer? ratio) -> Integer?
|
|
581
810
|
|
|
811
|
+
# Sets the tab ratio between tab bar and horizontal scrollbar (0-1000).
|
|
812
|
+
#
|
|
813
|
+
# @param ratio [Integer, nil]
|
|
814
|
+
# @return [Integer, nil]
|
|
815
|
+
# @api public
|
|
816
|
+
# : (Integer? ratio) -> Integer?
|
|
817
|
+
def tab_ratio=: (Integer? ratio) -> Integer?
|
|
818
|
+
|
|
582
819
|
# Gets or sets the sheet visibility state (:visible, :hidden, or :very_hidden).
|
|
583
820
|
#
|
|
821
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#state=} instead.
|
|
584
822
|
# @param new_state [Symbol, nil] The new state.
|
|
585
823
|
# @return [Symbol]
|
|
586
824
|
# @api public
|
|
587
825
|
# : (?Symbol? new_state) -> Symbol
|
|
588
826
|
def state: (?Symbol? new_state) -> Symbol
|
|
589
827
|
|
|
828
|
+
# Sets the sheet visibility state (:visible, :hidden, or :very_hidden).
|
|
829
|
+
#
|
|
830
|
+
# @param new_state [Symbol, String] The new state.
|
|
831
|
+
# @return [Symbol]
|
|
832
|
+
# @api public
|
|
833
|
+
# : (Symbol | String new_state) -> Symbol
|
|
834
|
+
def state=: (Symbol | String new_state) -> Symbol
|
|
835
|
+
|
|
590
836
|
# Gets or sets the tab color of this worksheet.
|
|
591
837
|
#
|
|
838
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#tab_color=} instead.
|
|
592
839
|
# @param spec [String, Hash, Symbol, nil] Tab color hex string or hash options.
|
|
593
840
|
# @param opts [Hash] Color keyword arguments (e.g. theme: 1, tint: 0.5).
|
|
594
841
|
# @return [String, Hash, nil]
|
|
@@ -596,40 +843,62 @@ module Xlsxrb
|
|
|
596
843
|
# : (?String | Symbol | Hash[Symbol, untyped] | nil spec, **untyped opts) -> (String | Hash[Symbol, untyped] | nil)
|
|
597
844
|
def tab_color: (?String | Symbol | Hash[Symbol, untyped] | nil spec, **untyped opts) -> (String | Hash[Symbol, untyped] | nil)
|
|
598
845
|
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
# Sets sheet properties (e.g. tab color, page setup flags).
|
|
846
|
+
# Sets the tab color of this worksheet.
|
|
602
847
|
#
|
|
603
|
-
# @
|
|
604
|
-
#
|
|
848
|
+
# @param spec [String, Hash, Symbol, nil] Tab color hex string or hash options.
|
|
849
|
+
# @return [String, Hash, nil]
|
|
850
|
+
# @api public
|
|
851
|
+
# : (String | Symbol | Hash[Symbol, untyped] | nil spec) -> (String | Hash[Symbol, untyped] | nil)
|
|
852
|
+
def tab_color=: (String | Symbol | Hash[Symbol, untyped] | nil spec) -> (String | Hash[Symbol, untyped] | nil)
|
|
853
|
+
|
|
854
|
+
# Sets a single sheet property.
|
|
605
855
|
#
|
|
606
856
|
# @param name [Symbol, String] Property name.
|
|
607
857
|
# @param value [Object] Property value.
|
|
608
858
|
# @return [void]
|
|
609
859
|
# @api public
|
|
610
860
|
# : (Symbol | String name, untyped value) -> void
|
|
611
|
-
def
|
|
861
|
+
def sheet_property: (Symbol | String name, untyped value) -> void
|
|
612
862
|
|
|
613
|
-
#
|
|
863
|
+
# Sets sheet properties (e.g. tab color, page setup flags). Accepts kwargs or name/value pair.
|
|
614
864
|
#
|
|
615
865
|
# @example
|
|
616
|
-
# s.
|
|
866
|
+
# s.sheet_properties(tab_color: "FF0000")
|
|
617
867
|
#
|
|
618
|
-
# @param name [String]
|
|
868
|
+
# @param name [Symbol, String, Hash, nil] Property name or hash.
|
|
869
|
+
# @param value [Object, nil] Property value.
|
|
870
|
+
# @param opts [Hash] Additional options.
|
|
871
|
+
# @return [void]
|
|
872
|
+
# @api public
|
|
873
|
+
# : (?Symbol | String | Hash[Symbol, untyped] | nil name, ?untyped value, **untyped opts) -> void
|
|
874
|
+
def sheet_properties: (?Symbol | String | Hash[Symbol, untyped] | nil name, ?untyped value, **untyped opts) -> void
|
|
875
|
+
|
|
876
|
+
# Replaces worksheet properties.
|
|
877
|
+
# @param opts [Hash, Elements::SheetProperties]
|
|
878
|
+
# @return [void]
|
|
879
|
+
# @api public
|
|
880
|
+
# : (Hash[Symbol, untyped] | Elements::SheetProperties opts) -> void
|
|
881
|
+
def sheet_properties=: (Hash[Symbol, untyped] | Elements::SheetProperties opts) -> void
|
|
882
|
+
|
|
619
883
|
# Adds a defined name (named range or formula) scoped to this sheet or workbook.
|
|
620
884
|
# Bare cell references and coordinate keywords are automatically formatted with sheet quotes and absolute $ references.
|
|
621
885
|
#
|
|
622
886
|
# @param name [String] Defined name identifier.
|
|
623
887
|
# @param value [Object, nil] Value or formula expression.
|
|
624
888
|
# @param hidden [Boolean] Whether the defined name is hidden.
|
|
625
|
-
# @param
|
|
889
|
+
# @param column [Integer, String, nil] Deprecated alias for columns.
|
|
890
|
+
# @param columns [Integer, String, nil] Column index or letter for coordinate-based reference.
|
|
891
|
+
# @param col [Integer, String, nil] Deprecated alias for column.
|
|
892
|
+
# @param row [Integer, Range, nil] Deprecated alias for rows.
|
|
626
893
|
# @param rows [Integer, Range, nil] Row or row range (1-based) for coordinate-based reference.
|
|
627
894
|
# @param range [String, nil] Cell range reference.
|
|
628
|
-
# @param sheet [String, nil]
|
|
895
|
+
# @param sheet [String, nil] Reference sheet name (defaults to current sheet).
|
|
896
|
+
# @param scope [String, Symbol, nil] Scope identifier (:workbook or sheet name).
|
|
897
|
+
# @param local [Boolean] Deprecated alias for scope: :current.
|
|
629
898
|
# @return [void]
|
|
630
899
|
# @api public
|
|
631
|
-
# : (String name, ?untyped value, ?hidden: bool, ?col: untyped, ?rows: untyped, ?range: untyped, ?sheet: String?, ?local: bool) -> void
|
|
632
|
-
def defined_name: (String name, ?untyped value, ?hidden: bool, ?col: untyped, ?rows: untyped, ?range: untyped, ?sheet: String?, ?local: bool) -> void
|
|
900
|
+
# : (String name, ?untyped value, ?hidden: bool, ?column: untyped, ?columns: untyped, ?col: untyped, ?row: untyped, ?rows: untyped, ?range: untyped, ?sheet: String?, ?scope: (String | Symbol)?, ?local: bool) -> void
|
|
901
|
+
def defined_name: (String name, ?untyped value, ?hidden: bool, ?column: untyped, ?columns: untyped, ?col: untyped, ?row: untyped, ?rows: untyped, ?range: untyped, ?sheet: String?, ?scope: (String | Symbol)?, ?local: bool) -> void
|
|
633
902
|
|
|
634
903
|
# Freezes rows and/or columns for scrolling.
|
|
635
904
|
#
|
|
@@ -637,35 +906,57 @@ module Xlsxrb
|
|
|
637
906
|
# s.freeze_pane(row: 1)
|
|
638
907
|
#
|
|
639
908
|
# @example Freeze first column and top 2 rows
|
|
640
|
-
# s.freeze_pane(row: 2,
|
|
909
|
+
# s.freeze_pane(row: 2, column: 1)
|
|
641
910
|
#
|
|
642
911
|
# @param row [Integer, nil] Number of rows to freeze.
|
|
643
|
-
# @param
|
|
912
|
+
# @param column [Integer, String, nil] Number of columns to freeze.
|
|
913
|
+
# @param col [Integer, String, nil] Deprecated alias for column.
|
|
644
914
|
# @return [void]
|
|
645
915
|
# @api public
|
|
646
|
-
# : (?row: Integer | nil, ?col: Integer |
|
|
647
|
-
def freeze_pane: (?row: Integer | nil, ?col: Integer |
|
|
916
|
+
# : (?row: Integer | nil, ?column: (Integer | String)?, ?col: (Integer | String)?) -> void
|
|
917
|
+
def freeze_pane: (?row: Integer | nil, ?column: (Integer | String)?, ?col: (Integer | String)?) -> void
|
|
648
918
|
|
|
649
|
-
#
|
|
650
|
-
# Edge case / untested delegation block
|
|
651
|
-
# Sets the print area range for the sheet.
|
|
919
|
+
# Sets or clears freeze pane configuration.
|
|
652
920
|
#
|
|
653
|
-
# @param
|
|
921
|
+
# @param opts [Elements::FreezePane, Hash, nil] Freeze pane options.
|
|
654
922
|
# @return [void]
|
|
655
923
|
# @api public
|
|
656
|
-
# : (
|
|
657
|
-
def
|
|
924
|
+
# : (untyped opts) -> void
|
|
925
|
+
def freeze_pane=: (untyped opts) -> void
|
|
658
926
|
|
|
659
|
-
#
|
|
660
|
-
# Edge case / untested delegation block
|
|
661
|
-
# Configures repeating title rows and columns for printing.
|
|
927
|
+
# Sets or gets the print area range for the sheet.
|
|
662
928
|
#
|
|
663
|
-
# @param
|
|
664
|
-
# @
|
|
665
|
-
# @
|
|
929
|
+
# @param range [String, Object, nil] Range reference.
|
|
930
|
+
# @return [String, nil, void]
|
|
931
|
+
# @api public
|
|
932
|
+
# : (?untyped range) -> (String | nil | void)
|
|
933
|
+
def print_area: (?untyped range) -> untyped
|
|
934
|
+
|
|
935
|
+
# Sets the print area for this worksheet.
|
|
936
|
+
#
|
|
937
|
+
# @param range [String, nil] Cell range (e.g. "A1:G50").
|
|
938
|
+
# @return [String, nil]
|
|
939
|
+
# @api public
|
|
940
|
+
# : (String? range) -> String?
|
|
941
|
+
def print_area=: (String? range) -> String?
|
|
942
|
+
|
|
943
|
+
# Configures or gets repeating title rows and columns for printing.
|
|
944
|
+
#
|
|
945
|
+
# @param rows [String, Integer, Range, Object, nil] Row range to repeat (e.g. "1:2").
|
|
946
|
+
# @param columns [String, Integer, Symbol, Range, Object, nil] Column range to repeat (e.g. "A:B").
|
|
947
|
+
# @param cols [String, Integer, Symbol, Range, Object, nil] Deprecated alias for columns.
|
|
948
|
+
# @return [Elements::PrintTitles, nil, void]
|
|
949
|
+
# @api public
|
|
950
|
+
# : (?rows: untyped, ?columns: untyped, ?cols: untyped) -> (Elements::PrintTitles | nil | void)
|
|
951
|
+
def print_titles: (?rows: untyped, ?columns: untyped, ?cols: untyped) -> untyped
|
|
952
|
+
|
|
953
|
+
# Sets repeating print titles for this worksheet.
|
|
954
|
+
#
|
|
955
|
+
# @param opts [Elements::PrintTitles, Hash, nil] Options with :rows and/or :columns.
|
|
956
|
+
# @return [Elements::PrintTitles, Hash, nil]
|
|
666
957
|
# @api public
|
|
667
|
-
# : (
|
|
668
|
-
def print_titles
|
|
958
|
+
# : (Elements::PrintTitles | Hash[Symbol, untyped] | nil opts) -> (Elements::PrintTitles | Hash[Symbol, untyped] | nil)
|
|
959
|
+
def print_titles=: (Elements::PrintTitles | Hash[Symbol, untyped] | nil opts) -> (Elements::PrintTitles | Hash[Symbol, untyped] | nil)
|
|
669
960
|
|
|
670
961
|
# Sets repeating title rows to appear at the top of each printed page.
|
|
671
962
|
#
|
|
@@ -687,45 +978,69 @@ module Xlsxrb
|
|
|
687
978
|
|
|
688
979
|
# Splits sheet view into panes.
|
|
689
980
|
#
|
|
690
|
-
# @param x_split [
|
|
691
|
-
# @param y_split [
|
|
981
|
+
# @param x_split [Integer] Horizontal split position.
|
|
982
|
+
# @param y_split [Integer] Vertical split position.
|
|
692
983
|
# @param top_left_cell [String, nil] Top-left visible cell in bottom-right pane.
|
|
693
|
-
# @param active_pane [String, nil] Active pane identifier.
|
|
694
|
-
# @param state [String, nil] Split state.
|
|
984
|
+
# @param active_pane [String, Symbol, nil] Active pane identifier.
|
|
985
|
+
# @param state [String, Symbol, nil] Split state.
|
|
986
|
+
# @return [void]
|
|
987
|
+
# @api public
|
|
988
|
+
# : (?x_split: Integer, ?y_split: Integer, ?top_left_cell: String?, ?active_pane: (String | Symbol)?, ?state: (String | Symbol)?) -> void
|
|
989
|
+
def split_pane: (?x_split: Integer, ?y_split: Integer, ?top_left_cell: String?, ?active_pane: (String | Symbol)?, ?state: (String | Symbol)?) -> void
|
|
990
|
+
|
|
991
|
+
# Sets or clears split pane configuration.
|
|
992
|
+
#
|
|
993
|
+
# @param opts [Elements::SplitPane, Hash, nil] Split pane options.
|
|
695
994
|
# @return [void]
|
|
696
995
|
# @api public
|
|
697
|
-
# : (
|
|
698
|
-
def split_pane
|
|
996
|
+
# : (untyped opts) -> void
|
|
997
|
+
def split_pane=: (untyped opts) -> void
|
|
699
998
|
|
|
700
999
|
# simplecov:disable
|
|
701
1000
|
# Edge case / untested delegation block
|
|
702
|
-
#
|
|
1001
|
+
# Sets workbook structure and window protection.
|
|
703
1002
|
#
|
|
704
1003
|
# @param opts [Hash] Protection options.
|
|
705
1004
|
# @return [void]
|
|
706
1005
|
# @api public
|
|
707
1006
|
# : (**untyped opts) -> void
|
|
1007
|
+
def workbook_protection: (**untyped opts) -> void
|
|
1008
|
+
|
|
1009
|
+
# @deprecated Use {#workbook_protection} instead.
|
|
1010
|
+
# : (**untyped opts) -> void
|
|
708
1011
|
def protect_workbook: (**untyped opts) -> void
|
|
709
1012
|
|
|
710
1013
|
# simplecov:disable
|
|
711
1014
|
# Edge case / untested delegation block
|
|
712
1015
|
# Sets core metadata property.
|
|
713
1016
|
#
|
|
714
|
-
# @param name [
|
|
715
|
-
# @param value [
|
|
1017
|
+
# @param name [Symbol] Property name.
|
|
1018
|
+
# @param value [String, Integer, Time] Property value.
|
|
716
1019
|
# @return [void]
|
|
717
1020
|
# @api public
|
|
718
|
-
# : (String |
|
|
719
|
-
def core_property: (String |
|
|
1021
|
+
# : (Symbol name, String | Integer | Time value) -> void
|
|
1022
|
+
def core_property: (Symbol name, String | Integer | Time value) -> void
|
|
720
1023
|
|
|
721
1024
|
# Sets the active/selected cell on the sheet.
|
|
722
1025
|
#
|
|
723
|
-
# @param active_cell [String] Cell reference (e.g. "A1").
|
|
1026
|
+
# @param active_cell [String] Cell reference (e.g. "A1") or range (e.g. "A1:D10").
|
|
724
1027
|
# @param sqref [String, nil] Selection range.
|
|
725
1028
|
# @param pane [String, Symbol, nil] Pane identifier.
|
|
726
1029
|
# @return [void]
|
|
727
1030
|
# @api public
|
|
728
1031
|
# : (String active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
1032
|
+
def selection: (String active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
1033
|
+
|
|
1034
|
+
# Sets or clears the selection configuration.
|
|
1035
|
+
#
|
|
1036
|
+
# @param opts [Elements::Selection, Array<Elements::Selection, Hash>, Hash, nil]
|
|
1037
|
+
# @return [void]
|
|
1038
|
+
# @api public
|
|
1039
|
+
# : (untyped opts) -> void
|
|
1040
|
+
def selection=: (untyped opts) -> void
|
|
1041
|
+
|
|
1042
|
+
# @deprecated Use {#selection} instead.
|
|
1043
|
+
# : (String active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
729
1044
|
def select_cell: (String active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
730
1045
|
|
|
731
1046
|
# Configures page margins for printing.
|
|
@@ -741,6 +1056,14 @@ module Xlsxrb
|
|
|
741
1056
|
# : (?left: Float | nil, ?right: Float | nil, ?top: Float | nil, ?bottom: Float | nil, ?header: Float | nil, ?footer: Float | nil) -> void
|
|
742
1057
|
def page_margins: (?left: Float | nil, ?right: Float | nil, ?top: Float | nil, ?bottom: Float | nil, ?header: Float | nil, ?footer: Float | nil) -> void
|
|
743
1058
|
|
|
1059
|
+
# Sets page margins configuration.
|
|
1060
|
+
#
|
|
1061
|
+
# @param opts [Hash, Elements::PageMargins, nil]
|
|
1062
|
+
# @return [void]
|
|
1063
|
+
# @api public
|
|
1064
|
+
# : (untyped opts) -> void
|
|
1065
|
+
def page_margins=: (untyped opts) -> void
|
|
1066
|
+
|
|
744
1067
|
# Configures page orientation, paper size, and print setup.
|
|
745
1068
|
#
|
|
746
1069
|
# @param orientation [String, Symbol, nil] "portrait" or "landscape" (or :portrait, :landscape).
|
|
@@ -751,6 +1074,14 @@ module Xlsxrb
|
|
|
751
1074
|
# : (?orientation: (String | Symbol)?, ?paper_size: Integer | nil, **untyped opts) -> void
|
|
752
1075
|
def page_setup: (?orientation: (String | Symbol)?, ?paper_size: Integer | nil, **untyped opts) -> void
|
|
753
1076
|
|
|
1077
|
+
# Sets page setup configuration.
|
|
1078
|
+
#
|
|
1079
|
+
# @param opts [Hash, Elements::PageSetup]
|
|
1080
|
+
# @return [void]
|
|
1081
|
+
# @api public
|
|
1082
|
+
# : (untyped opts) -> void
|
|
1083
|
+
def page_setup=: (untyped opts) -> void
|
|
1084
|
+
|
|
754
1085
|
# Configures header and footer text for printing.
|
|
755
1086
|
#
|
|
756
1087
|
# @param opts [Hash] Header and footer specifications.
|
|
@@ -759,14 +1090,30 @@ module Xlsxrb
|
|
|
759
1090
|
# : (**untyped opts) -> void
|
|
760
1091
|
def header_footer: (**untyped opts) -> void
|
|
761
1092
|
|
|
1093
|
+
# Sets header and footer configuration.
|
|
1094
|
+
#
|
|
1095
|
+
# @param opts [Hash, Elements::HeaderFooter]
|
|
1096
|
+
# @return [void]
|
|
1097
|
+
# @api public
|
|
1098
|
+
# : (untyped opts) -> void
|
|
1099
|
+
def header_footer=: (untyped opts) -> void
|
|
1100
|
+
|
|
762
1101
|
# Configures print options (e.g. gridlines, headings).
|
|
763
1102
|
#
|
|
764
|
-
# @param name [Symbol, String] Print option name.
|
|
765
|
-
# @param value [Object] Print option value.
|
|
1103
|
+
# @param name [Symbol, String, Hash, nil] Print option name or hash.
|
|
1104
|
+
# @param value [Object, nil] Print option value.
|
|
1105
|
+
# @param opts [Hash] Additional options.
|
|
766
1106
|
# @return [void]
|
|
767
1107
|
# @api public
|
|
768
|
-
# : (Symbol | String name, untyped value) -> void
|
|
769
|
-
def print_options: (Symbol | String name, untyped value) -> void
|
|
1108
|
+
# : (?Symbol | String | Hash[Symbol, untyped] | nil name, ?untyped value, **untyped opts) -> void
|
|
1109
|
+
def print_options: (?Symbol | String | Hash[Symbol, untyped] | nil name, ?untyped value, **untyped opts) -> void
|
|
1110
|
+
|
|
1111
|
+
# Replaces print options.
|
|
1112
|
+
# @param opts [Hash, Elements::PrintOptions]
|
|
1113
|
+
# @return [void]
|
|
1114
|
+
# @api public
|
|
1115
|
+
# : (Hash[Symbol, untyped] | Elements::PrintOptions opts) -> void
|
|
1116
|
+
def print_options=: (Hash[Symbol, untyped] | Elements::PrintOptions opts) -> void
|
|
770
1117
|
|
|
771
1118
|
# simplecov:disable
|
|
772
1119
|
# Edge case / untested delegation block
|
|
@@ -784,51 +1131,67 @@ module Xlsxrb
|
|
|
784
1131
|
# Edge case / untested delegation block
|
|
785
1132
|
# Sets app metadata property.
|
|
786
1133
|
#
|
|
787
|
-
# @param name [
|
|
788
|
-
# @param value [
|
|
1134
|
+
# @param name [Symbol] Property name.
|
|
1135
|
+
# @param value [String, Integer, Time] Property value.
|
|
789
1136
|
# @return [void]
|
|
790
1137
|
# @api public
|
|
791
|
-
# : (String |
|
|
792
|
-
def app_property: (String |
|
|
1138
|
+
# : (Symbol name, String | Integer | Time value) -> void
|
|
1139
|
+
def app_property: (Symbol name, String | Integer | Time value) -> void
|
|
793
1140
|
|
|
794
|
-
#
|
|
1141
|
+
# Sets sheet-level protection with optional password hashing.
|
|
795
1142
|
#
|
|
796
1143
|
# @param opts [Hash] Protection options.
|
|
797
1144
|
# @return [void]
|
|
798
1145
|
# @api public
|
|
799
1146
|
# : (**untyped opts) -> void
|
|
1147
|
+
def sheet_protection: (**untyped opts) -> void
|
|
1148
|
+
|
|
1149
|
+
# Sets or clears sheet protection configuration.
|
|
1150
|
+
#
|
|
1151
|
+
# @param opts [Elements::SheetProtection, Hash, Boolean, nil]
|
|
1152
|
+
# @return [void]
|
|
1153
|
+
# @api public
|
|
1154
|
+
# : (untyped opts) -> void
|
|
1155
|
+
def sheet_protection=: (untyped opts) -> void
|
|
1156
|
+
|
|
1157
|
+
# @deprecated Use {#sheet_protection} instead.
|
|
1158
|
+
# : (**untyped opts) -> void
|
|
800
1159
|
def protect_sheet: (**untyped opts) -> void
|
|
801
1160
|
|
|
802
1161
|
# simplecov:disable
|
|
803
1162
|
# Edge case / untested delegation block
|
|
804
1163
|
# Sets custom metadata property.
|
|
805
1164
|
#
|
|
806
|
-
# @param name [String
|
|
807
|
-
# @param value [
|
|
1165
|
+
# @param name [String] Property name.
|
|
1166
|
+
# @param value [String, Integer, Float, Boolean, Time] Property value.
|
|
1167
|
+
# @param type [Symbol] Value type.
|
|
808
1168
|
# @return [void]
|
|
809
1169
|
# @api public
|
|
810
|
-
# : (String |
|
|
811
|
-
def custom_property: (String |
|
|
1170
|
+
# : (String name, String | Integer | Float | bool | Time value, ?type: ::Symbol) -> void
|
|
1171
|
+
def custom_property: (String name, String | Integer | Float | bool | Time value, ?type: ::Symbol) -> void
|
|
812
1172
|
|
|
813
1173
|
# Inserts an image into the sheet.
|
|
814
1174
|
#
|
|
815
1175
|
# @param file_data [String] Binary image data or file content.
|
|
816
1176
|
# @param ext [String] Image extension ("png", "jpeg", etc.).
|
|
817
|
-
# @param
|
|
1177
|
+
# @param from_column [Integer, nil] Starting column index (0-based).
|
|
1178
|
+
# @param from_col [Integer, nil] Deprecated alias for from_column.
|
|
818
1179
|
# @param from_row [Integer] Starting row index (0-based).
|
|
819
|
-
# @param
|
|
1180
|
+
# @param to_column [Integer, nil] Ending column index (0-based).
|
|
1181
|
+
# @param to_col [Integer, nil] Deprecated alias for to_column.
|
|
820
1182
|
# @param to_row [Integer] Ending row index (0-based).
|
|
821
1183
|
# @param opts [Hash] Additional anchor and sizing options.
|
|
822
1184
|
# @return [void]
|
|
823
1185
|
# @api public
|
|
824
|
-
# : (String file_data, ?ext: String, ?from_col: Integer
|
|
825
|
-
def image: (String file_data, ?ext: String, ?from_col: Integer
|
|
1186
|
+
# : (String file_data, ?ext: String, ?from_column: Integer?, ?from_col: Integer?, ?from_row: Integer, ?to_column: Integer?, ?to_col: Integer?, ?to_row: Integer, **untyped opts) -> void
|
|
1187
|
+
def image: (String file_data, ?ext: String, ?from_column: Integer?, ?from_col: Integer?, ?from_row: Integer, ?to_column: Integer?, ?to_col: Integer?, ?to_row: Integer, **untyped opts) -> void
|
|
826
1188
|
|
|
827
1189
|
# Configures the worksheet background image (<picture>).
|
|
828
1190
|
#
|
|
829
1191
|
# @example Set background image from binary data
|
|
830
1192
|
# sheet.background_image(png_bytes, ext: "png")
|
|
831
1193
|
#
|
|
1194
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#background_image=} instead.
|
|
832
1195
|
# @param file_data [String, Hash, Elements::Image, nil] Image binary data, file path, or image options hash.
|
|
833
1196
|
# @param ext [String, nil] Image extension.
|
|
834
1197
|
# @param opts [Hash] Additional options.
|
|
@@ -837,24 +1200,37 @@ module Xlsxrb
|
|
|
837
1200
|
# : (?untyped file_data, ?ext: String?, **untyped opts) -> Hash[Symbol, untyped]?
|
|
838
1201
|
def background_image: (?untyped file_data, ?ext: String?, **untyped opts) -> Hash[Symbol, untyped]?
|
|
839
1202
|
|
|
1203
|
+
# @deprecated Use {#background_image} instead. Will be removed in 0.2.0.
|
|
840
1204
|
alias background_picture background_image
|
|
841
1205
|
|
|
1206
|
+
# @deprecated Use {#background_image} instead. Will be removed in 0.2.0.
|
|
842
1207
|
alias picture background_image
|
|
843
1208
|
|
|
1209
|
+
# : (untyped val) -> untyped
|
|
844
1210
|
def background_image=: (untyped val) -> untyped
|
|
845
1211
|
|
|
1212
|
+
# @deprecated Use {#background_image=} instead. Will be removed in 0.2.0.
|
|
846
1213
|
alias background_picture= background_image=
|
|
847
1214
|
|
|
1215
|
+
# @deprecated Use {#background_image=} instead. Will be removed in 0.2.0.
|
|
848
1216
|
alias picture= background_image=
|
|
849
1217
|
|
|
850
1218
|
# Configures sheet view settings (zoom scale, grid lines visibility).
|
|
851
1219
|
#
|
|
852
|
-
# @param name [Symbol, String] View setting name.
|
|
853
|
-
# @param value [Object] View setting value.
|
|
1220
|
+
# @param name [Symbol, String, Hash, nil] View setting name or hash.
|
|
1221
|
+
# @param value [Object, nil] View setting value.
|
|
1222
|
+
# @param opts [Hash] Additional options.
|
|
854
1223
|
# @return [void]
|
|
855
1224
|
# @api public
|
|
856
|
-
# : (Symbol | String name, untyped value) -> void
|
|
857
|
-
def sheet_view: (Symbol | String name, untyped value) -> void
|
|
1225
|
+
# : (?Symbol | String | Hash[Symbol, untyped] | nil name, ?untyped value, **untyped opts) -> void
|
|
1226
|
+
def sheet_view: (?Symbol | String | Hash[Symbol, untyped] | nil name, ?untyped value, **untyped opts) -> void
|
|
1227
|
+
|
|
1228
|
+
# Replaces sheet view properties.
|
|
1229
|
+
# @param opts [Hash, Elements::SheetView]
|
|
1230
|
+
# @return [void]
|
|
1231
|
+
# @api public
|
|
1232
|
+
# : (Hash[Symbol, untyped] | Elements::SheetView opts) -> void
|
|
1233
|
+
def sheet_view=: (Hash[Symbol, untyped] | Elements::SheetView opts) -> void
|
|
858
1234
|
|
|
859
1235
|
# Configures sheet format properties (e.g. default_row_height, default_col_width).
|
|
860
1236
|
#
|
|
@@ -863,8 +1239,15 @@ module Xlsxrb
|
|
|
863
1239
|
# @param opts [Hash] Keyword arguments for sheet format properties.
|
|
864
1240
|
# @return [Hash[Symbol, untyped]]
|
|
865
1241
|
# @api public
|
|
866
|
-
# : (?Symbol | String | Hash[Symbol, untyped] | nil name, ?untyped value, **untyped opts) ->
|
|
867
|
-
def sheet_format: (?
|
|
1242
|
+
# : (?Symbol | String | Hash[Symbol, untyped] | Elements::MetadataRecord | nil name, ?untyped value, **untyped opts) -> (Elements::SheetFormat | void)
|
|
1243
|
+
def sheet_format: (?untyped name, ?untyped value, **untyped opts) -> untyped
|
|
1244
|
+
|
|
1245
|
+
# Replaces sheet format properties.
|
|
1246
|
+
# @param opts [Hash, Elements::SheetFormat]
|
|
1247
|
+
# @return [void]
|
|
1248
|
+
# @api public
|
|
1249
|
+
# : (Hash[Symbol, untyped] | Elements::SheetFormat opts) -> void
|
|
1250
|
+
def sheet_format=: (Hash[Symbol, untyped] | Elements::SheetFormat opts) -> void
|
|
868
1251
|
|
|
869
1252
|
# simplecov:disable
|
|
870
1253
|
# Edge case / untested delegation block
|
|
@@ -874,17 +1257,25 @@ module Xlsxrb
|
|
|
874
1257
|
# @return [void]
|
|
875
1258
|
# @api public
|
|
876
1259
|
# : (Integer row_index) -> void
|
|
877
|
-
def
|
|
1260
|
+
def row_break: (Integer row_index) -> void
|
|
1261
|
+
|
|
1262
|
+
# @deprecated Use {#row_break} instead.
|
|
1263
|
+
# : (Integer row_num) -> void
|
|
1264
|
+
def page_break_row: (Integer row_num) -> void
|
|
878
1265
|
|
|
879
1266
|
# simplecov:disable
|
|
880
1267
|
# Edge case / untested delegation block
|
|
881
|
-
# Adds a vertical page break after the given column
|
|
1268
|
+
# Adds a vertical page break after the given column.
|
|
882
1269
|
#
|
|
883
|
-
# @param
|
|
1270
|
+
# @param col [Integer, String, Symbol] 0-based column index or column letter.
|
|
884
1271
|
# @return [void]
|
|
885
1272
|
# @api public
|
|
886
|
-
# : (Integer
|
|
887
|
-
def
|
|
1273
|
+
# : (Integer | String | Symbol col) -> void
|
|
1274
|
+
def column_break: (Integer | String | Symbol col) -> void
|
|
1275
|
+
|
|
1276
|
+
# @deprecated Use {#column_break} instead.
|
|
1277
|
+
# : (Integer | String | Symbol col_index) -> void
|
|
1278
|
+
def page_break_col: (Integer | String | Symbol col_index) -> void
|
|
888
1279
|
|
|
889
1280
|
# Adds a protected range to the sheet.
|
|
890
1281
|
#
|
|
@@ -897,6 +1288,7 @@ module Xlsxrb
|
|
|
897
1288
|
# : (String name, String sqref, ?password: String?, **untyped opts) -> void
|
|
898
1289
|
def protected_range: (String name, String sqref, ?password: String?, **untyped opts) -> void
|
|
899
1290
|
|
|
1291
|
+
# @deprecated Use {#protected_range} instead. Will be removed in 0.2.0.
|
|
900
1292
|
alias add_protected_range protected_range
|
|
901
1293
|
|
|
902
1294
|
# Adds a cell watch to the sheet.
|
|
@@ -907,6 +1299,7 @@ module Xlsxrb
|
|
|
907
1299
|
# : (String ref) -> void
|
|
908
1300
|
def cell_watch: (String ref) -> void
|
|
909
1301
|
|
|
1302
|
+
# @deprecated Use {#cell_watch} instead. Will be removed in 0.2.0.
|
|
910
1303
|
alias add_cell_watch cell_watch
|
|
911
1304
|
|
|
912
1305
|
# Adds an ignored error entry to the sheet.
|
|
@@ -916,9 +1309,15 @@ module Xlsxrb
|
|
|
916
1309
|
# @return [void]
|
|
917
1310
|
# @api public
|
|
918
1311
|
# : (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
1312
|
+
def ignored_error: (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
1313
|
+
|
|
1314
|
+
# @deprecated Use {#ignored_error} instead. Will be removed in 0.2.0.
|
|
1315
|
+
# : (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
919
1316
|
def ignore_error: (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
920
1317
|
|
|
921
|
-
|
|
1318
|
+
# @deprecated Use {#ignored_error} instead. Will be removed in 0.2.0.
|
|
1319
|
+
# : (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
1320
|
+
def add_ignored_error: (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
922
1321
|
|
|
923
1322
|
# Returns the ignored error entries configured for this sheet.
|
|
924
1323
|
#
|
|
@@ -929,29 +1328,46 @@ module Xlsxrb
|
|
|
929
1328
|
|
|
930
1329
|
# Gets or sets phonetic (furigana) guide properties for the sheet.
|
|
931
1330
|
#
|
|
1331
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#phonetic_properties=} instead.
|
|
932
1332
|
# @api public
|
|
933
|
-
# : (?
|
|
934
|
-
def phonetic_properties: (?
|
|
935
|
-
|
|
936
|
-
alias phonetic_properties= phonetic_properties
|
|
1333
|
+
# : (?untyped spec, ?font_id: Integer?, ?type: (Symbol | String)?, ?alignment: (Symbol | String)?, **untyped opts) -> (Elements::PhoneticProperties | Hash[Symbol, untyped] | nil)
|
|
1334
|
+
def phonetic_properties: (?untyped spec, ?font_id: Integer?, ?type: (Symbol | String)?, ?alignment: (Symbol | String)?, **untyped opts) -> (Elements::PhoneticProperties | Hash[Symbol, untyped] | nil)
|
|
937
1335
|
|
|
1336
|
+
# @deprecated Use {#phonetic_properties} instead. Will be removed in 0.2.0.
|
|
938
1337
|
alias phonetic_pr phonetic_properties
|
|
939
1338
|
|
|
940
|
-
|
|
1339
|
+
# Sets phonetic (furigana) guide properties for the sheet.
|
|
1340
|
+
#
|
|
1341
|
+
# @param spec [Hash, Integer, nil] Options hash or font ID integer.
|
|
1342
|
+
# @return [Hash[Symbol, untyped], Integer, nil]
|
|
1343
|
+
# @api public
|
|
1344
|
+
# : (Hash[Symbol, untyped] | Integer | nil spec) -> (Hash[Symbol, untyped] | Integer | nil)
|
|
1345
|
+
def phonetic_properties=: (Hash[Symbol, untyped] | Integer | nil spec) -> (Hash[Symbol, untyped] | Integer | nil)
|
|
1346
|
+
|
|
1347
|
+
# @deprecated Use {#phonetic_properties=} instead. Will be removed in 0.2.0.
|
|
1348
|
+
alias phonetic_pr= phonetic_properties=
|
|
941
1349
|
|
|
942
1350
|
# Sets or gets the internal code name of the worksheet.
|
|
943
1351
|
#
|
|
1352
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#code_name=} instead.
|
|
944
1353
|
# @param val [String, Symbol, nil] The code name.
|
|
945
1354
|
# @return [String, nil]
|
|
946
1355
|
# @api public
|
|
947
1356
|
# : (?String | Symbol | nil val) -> String?
|
|
948
1357
|
def code_name: (?String | Symbol | nil val) -> String?
|
|
949
1358
|
|
|
950
|
-
|
|
1359
|
+
# Sets the internal code name of the worksheet.
|
|
1360
|
+
#
|
|
1361
|
+
# @param val [String, Symbol, nil] The code name.
|
|
1362
|
+
# @return [String, nil]
|
|
1363
|
+
# @api public
|
|
1364
|
+
# : (String | Symbol | nil val) -> String?
|
|
1365
|
+
def code_name=: (String | Symbol | nil val) -> String?
|
|
951
1366
|
|
|
952
1367
|
# Configures whether page setup fits content to page width/height.
|
|
953
1368
|
# When enabled, optionally sets fit_to_width and/or fit_to_height on page_setup.
|
|
954
1369
|
#
|
|
1370
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#fit_to_page=} or {#page_setup} with :fit_to_width/:fit_to_height instead.
|
|
955
1371
|
# @param enabled [Boolean, nil] Whether to fit to page.
|
|
956
1372
|
# @param width [Integer, nil] Pages wide to fit to.
|
|
957
1373
|
# @param height [Integer, nil] Pages tall to fit to.
|
|
@@ -960,24 +1376,53 @@ module Xlsxrb
|
|
|
960
1376
|
# : (?bool? enabled, ?width: Integer?, ?height: Integer?) -> (bool | void)
|
|
961
1377
|
def fit_to_page: (?untyped enabled, ?width: untyped, ?height: untyped) -> untyped
|
|
962
1378
|
|
|
963
|
-
|
|
1379
|
+
# @deprecated Use {#fit_to_page} instead. Will be removed in 0.2.0.
|
|
1380
|
+
# @return [Boolean]
|
|
1381
|
+
# @api public
|
|
1382
|
+
# : () -> bool
|
|
1383
|
+
def fit_to_page?: () -> bool
|
|
964
1384
|
|
|
965
|
-
|
|
1385
|
+
# Sets whether page setup fits content to page width/height.
|
|
1386
|
+
#
|
|
1387
|
+
# @param enabled [Boolean, nil] Whether to fit to page.
|
|
1388
|
+
# @return [Boolean]
|
|
1389
|
+
# @api public
|
|
1390
|
+
# : (bool? enabled) -> bool?
|
|
1391
|
+
def fit_to_page=: (bool? enabled) -> bool?
|
|
966
1392
|
|
|
967
1393
|
# Configures worksheet calculation properties (<sheetCalcPr>).
|
|
968
1394
|
#
|
|
1395
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#sheet_calc_properties=} instead.
|
|
969
1396
|
# @param spec [Hash, nil] Calculation properties hash.
|
|
970
1397
|
# @param full_calc_on_load [Boolean, nil] Whether to recalculate when loading.
|
|
971
1398
|
# @return [Hash, nil]
|
|
972
1399
|
# @api public
|
|
973
|
-
# : (?
|
|
974
|
-
def
|
|
1400
|
+
# : (?untyped spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
1401
|
+
def sheet_calc_properties: (?untyped spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
1402
|
+
|
|
1403
|
+
# Sets worksheet calculation properties (<sheetCalcPr>).
|
|
1404
|
+
#
|
|
1405
|
+
# @param spec [Hash, nil] Calculation properties hash.
|
|
1406
|
+
# @return [Hash, nil]
|
|
1407
|
+
# @api public
|
|
1408
|
+
# : (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
1409
|
+
def sheet_calc_properties=: (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
1410
|
+
|
|
1411
|
+
# @deprecated Use {#sheet_calc_properties} instead. Will be removed in 0.2.0.
|
|
1412
|
+
# : (?Hash[Symbol, untyped]? spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
1413
|
+
def sheet_calc_pr: (?Hash[Symbol, untyped]? spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
975
1414
|
|
|
976
|
-
|
|
1415
|
+
# @deprecated Use {#sheet_calc_properties} instead. Will be removed in 0.2.0.
|
|
1416
|
+
# : (?Hash[Symbol, untyped]? spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
1417
|
+
def calc_pr: (?Hash[Symbol, untyped]? spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
977
1418
|
|
|
978
|
-
|
|
1419
|
+
# @deprecated Use {#sheet_calc_properties=} instead. Will be removed in 0.2.0.
|
|
1420
|
+
# : (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
1421
|
+
def sheet_calc_pr=: (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
979
1422
|
|
|
980
|
-
|
|
1423
|
+
# @deprecated Use {#sheet_calc_properties=} instead. Will be removed in 0.2.0.
|
|
1424
|
+
# : (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
1425
|
+
def calc_pr=: (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
981
1426
|
end
|
|
982
1427
|
|
|
983
1428
|
# Returns the list of worksheet names created in this workbook so far.
|
|
@@ -990,34 +1435,55 @@ module Xlsxrb
|
|
|
990
1435
|
# Adds a new sheet to the workbook and starts streaming rows into it.
|
|
991
1436
|
#
|
|
992
1437
|
# @param name [String, nil] Sheet name (max 31 characters).
|
|
1438
|
+
# @param state [Symbol, String, nil] Sheet visibility state (:visible, :hidden, :very_hidden).
|
|
1439
|
+
# @param tab_color [String, Hash, nil] Tab color hex string or color hash.
|
|
1440
|
+
# @param code_name [String, nil] VBA code name.
|
|
1441
|
+
# @param hidden [Boolean, nil] Deprecated alias for state: :hidden.
|
|
993
1442
|
# @param opts [Hash] Sheet-level configuration.
|
|
994
1443
|
# @yield [sheet_proxy]
|
|
995
1444
|
# @yieldparam sheet_proxy [WorksheetProxy] The streaming sheet proxy.
|
|
996
1445
|
# @return [String] The sheet name.
|
|
997
1446
|
# @api public
|
|
998
|
-
# : (?String? name, **untyped opts) ?{ (WorksheetProxy) -> void } ->
|
|
999
|
-
def sheet: (?String? name, **untyped opts) ?{ (WorksheetProxy) -> void } ->
|
|
1447
|
+
# : (?String? name, ?state: (Symbol | String)?, ?tab_color: untyped, ?code_name: String?, ?hidden: bool?, **untyped opts) ?{ (WorksheetProxy) -> void } -> String
|
|
1448
|
+
def sheet: (?String? name, ?state: (Symbol | String)?, ?tab_color: untyped, ?code_name: String?, ?hidden: bool?, **untyped opts) ?{ (WorksheetProxy) -> void } -> String
|
|
1449
|
+
|
|
1450
|
+
# Returns a WorksheetProxy for the current or named sheet.
|
|
1451
|
+
#
|
|
1452
|
+
# @param name_or_index [String, Symbol, Integer, nil] Sheet name or 0-based sheet index.
|
|
1453
|
+
# @yield [proxy]
|
|
1454
|
+
# @yieldparam proxy [WorksheetProxy]
|
|
1455
|
+
# @return [WorksheetProxy]
|
|
1456
|
+
# @api public
|
|
1457
|
+
# : (?String | Symbol | Integer | nil name_or_index) ?{ (WorksheetProxy) -> void } -> WorksheetProxy
|
|
1458
|
+
def []: (?String | Symbol | Integer | nil name_or_index) ?{ (WorksheetProxy) -> void } -> WorksheetProxy
|
|
1000
1459
|
|
|
1001
1460
|
# Internal: Start or switch to a named sheet (internal helper).
|
|
1461
|
+
# @api private
|
|
1002
1462
|
# : (?String? name, ?state: Symbol) ?{ (WorksheetProxy) -> void } -> (WorksheetProxy | nil)
|
|
1003
1463
|
def internal_sheet_setup: (?String? name, ?state: Symbol) ?{ (WorksheetProxy) -> void } -> (WorksheetProxy | nil)
|
|
1004
1464
|
|
|
1005
|
-
|
|
1465
|
+
# @api private
|
|
1466
|
+
# : () -> void
|
|
1467
|
+
def start_sheet_entry: () -> void
|
|
1006
1468
|
|
|
1007
1469
|
# Appends a row of values to the active sheet.
|
|
1008
1470
|
#
|
|
1009
1471
|
# @param values [Array<Object>, Hash] The cell values.
|
|
1010
|
-
# @param
|
|
1472
|
+
# @param cell_styles [String, Symbol, Array, Hash, nil] Style names or inline style definitions to apply to cells.
|
|
1473
|
+
# @param row_style [Integer, Symbol, String, Hash, nil] Row style format or index.
|
|
1011
1474
|
# @param height [Float, Integer, nil] The row height in points (0 - 409).
|
|
1012
1475
|
# @param hidden [Boolean] Whether the row is hidden.
|
|
1013
1476
|
# @param custom_height [Boolean] Whether custom row height is set.
|
|
1014
1477
|
# @param outline_level [Integer, nil] Grouping/outline level (0 - 7).
|
|
1015
|
-
# @param
|
|
1478
|
+
# @param collapsed [Boolean] Whether the row is collapsed.
|
|
1479
|
+
# @param styles [String, Symbol, Array, Hash, nil] Deprecated. Use cell_styles: instead.
|
|
1480
|
+
# @param style [Integer, Symbol, String, Hash, nil] Deprecated. Use row_style: instead.
|
|
1016
1481
|
# @return [void]
|
|
1017
1482
|
# @api public
|
|
1018
|
-
# : (Array[untyped] | Hash[untyped, untyped] values, ?styles: untyped, ?height: Float | Integer | nil, ?hidden: bool, ?custom_height: bool, ?collapsed: bool, ?outline_level: Integer | nil
|
|
1019
|
-
def row: (Array[untyped] | Hash[untyped, untyped] values, ?styles: untyped, ?height: Float | Integer | nil, ?hidden: bool, ?custom_height: bool, ?collapsed: bool, ?outline_level: Integer | nil
|
|
1483
|
+
# : (Array[untyped] | Hash[untyped, untyped] values, ?cell_styles: untyped, ?row_style: untyped, ?styles: untyped, ?style: untyped, ?height: Float | Integer | nil, ?hidden: bool, ?custom_height: bool, ?collapsed: bool, ?outline_level: Integer | nil) -> void
|
|
1484
|
+
def row: (Array[untyped] | Hash[untyped, untyped] values, ?cell_styles: untyped, ?row_style: untyped, ?styles: untyped, ?style: untyped, ?height: Float | Integer | nil, ?hidden: bool, ?custom_height: bool, ?collapsed: bool, ?outline_level: Integer | nil) -> void
|
|
1020
1485
|
|
|
1486
|
+
# @deprecated Use {#row} instead. Will be removed in 0.2.0.
|
|
1021
1487
|
alias add_row row
|
|
1022
1488
|
|
|
1023
1489
|
# Appends a row to the worksheet and returns self for chaining.
|
|
@@ -1045,19 +1511,30 @@ module Xlsxrb
|
|
|
1045
1511
|
# : (?Integer count) -> void
|
|
1046
1512
|
def skip_rows: (?Integer count) -> void
|
|
1047
1513
|
|
|
1514
|
+
# @deprecated Use {#skip_rows} instead. Will be removed in 0.2.0.
|
|
1048
1515
|
alias skip_row skip_rows
|
|
1049
1516
|
|
|
1050
1517
|
# Sets column formatting and properties for one or multiple columns.
|
|
1051
1518
|
#
|
|
1052
|
-
# @param index [Integer, String, Range, Array] Column index (0-based)
|
|
1519
|
+
# @param index [Integer, String, Symbol, Range, Array] Column index (0-based), letter ("A", :A), range, or array.
|
|
1053
1520
|
# @param width [Float, Integer, nil] Column width in character units (0 - 255).
|
|
1054
1521
|
# @param hidden [Boolean] Whether the column is hidden.
|
|
1522
|
+
# @param custom_width [Boolean] Whether custom width flag is set.
|
|
1523
|
+
# @param outline_level [Integer, nil] Grouping/outline level.
|
|
1055
1524
|
# @param collapsed [Boolean] Whether the column is collapsed.
|
|
1056
1525
|
# @param style [Integer, Symbol, String, Hash, nil] Column style format or index.
|
|
1526
|
+
# @param best_fit [Boolean] Whether the column automatically fits content.
|
|
1057
1527
|
# @return [void]
|
|
1058
1528
|
# @api public
|
|
1059
|
-
# : (Integer | String | Range[Integer | String] | Array[Integer | String] index, ?width: Float | Integer | nil, ?hidden: bool, ?custom_width: bool, ?outline_level: Integer | nil, ?collapsed: bool, ?style: (Integer | Symbol | String | Hash[Symbol, untyped])?) -> void
|
|
1060
|
-
def column: (Integer | String | Range[Integer | String] | Array[Integer | String] index, ?width: Float | Integer | nil, ?hidden: bool, ?custom_width: bool, ?outline_level: Integer | nil, ?collapsed: bool, ?style: (Integer | Symbol | String | Hash[Symbol, untyped])?) -> void
|
|
1529
|
+
# : (Integer | String | Symbol | Range[Integer | String | Symbol] | Array[Integer | String | Symbol] index, ?width: Float | Integer | nil, ?hidden: bool, ?custom_width: bool, ?outline_level: Integer | nil, ?collapsed: bool, ?style: (Integer | Symbol | String | Hash[Symbol, untyped])?, ?best_fit: bool) -> void
|
|
1530
|
+
def column: (Integer | String | Symbol | Range[Integer | String | Symbol] | Array[Integer | String | Symbol] index, ?width: Float | Integer | nil, ?hidden: bool, ?custom_width: bool, ?outline_level: Integer | nil, ?collapsed: bool, ?style: (Integer | Symbol | String | Hash[Symbol, untyped])?, ?best_fit: bool) -> void
|
|
1531
|
+
|
|
1532
|
+
# Returns column configurations defined for the current worksheet.
|
|
1533
|
+
#
|
|
1534
|
+
# @return [Array<Elements::Column>]
|
|
1535
|
+
# @api public
|
|
1536
|
+
# : () -> Array[Elements::Column]
|
|
1537
|
+
def columns: () -> Array[Elements::Column]
|
|
1061
1538
|
|
|
1062
1539
|
# Groups multiple columns together with outline hierarchy.
|
|
1063
1540
|
#
|
|
@@ -1078,10 +1555,13 @@ module Xlsxrb
|
|
|
1078
1555
|
# : (Integer | String | Range[Integer | String] | Array[Integer | String] index, ?level: Integer, ?collapsed: bool, ?hidden: bool, ?width: Float | Integer | nil, ?style: untyped) -> void
|
|
1079
1556
|
def group_columns: (Integer | String | Range[Integer | String] | Array[Integer | String] index, ?level: Integer, ?collapsed: bool, ?hidden: bool, ?width: Float | Integer | nil, ?style: untyped) -> void
|
|
1080
1557
|
|
|
1558
|
+
# @deprecated Use {#group_columns} instead. Will be removed in 0.2.0.
|
|
1081
1559
|
alias group_column group_columns
|
|
1082
1560
|
|
|
1561
|
+
# @deprecated Use {#group_columns} instead. Will be removed in 0.2.0.
|
|
1083
1562
|
alias group_cols group_columns
|
|
1084
1563
|
|
|
1564
|
+
# @deprecated Use {#group_columns} instead. Will be removed in 0.2.0.
|
|
1085
1565
|
alias group_col group_columns
|
|
1086
1566
|
|
|
1087
1567
|
# Groups multiple rows with outline hierarchy with a block.
|
|
@@ -1102,6 +1582,7 @@ module Xlsxrb
|
|
|
1102
1582
|
# : (?untyped rows, ?level: Integer, ?collapsed: bool, ?hidden: bool) ?{ (self) -> void } -> void
|
|
1103
1583
|
def group_rows: (?untyped rows, ?level: Integer, ?collapsed: bool, ?hidden: bool) ?{ (self) -> void } -> void
|
|
1104
1584
|
|
|
1585
|
+
# @deprecated Use {#group_rows} instead. Will be removed in 0.2.0.
|
|
1105
1586
|
alias group_row group_rows
|
|
1106
1587
|
|
|
1107
1588
|
# Configures worksheet-level outline and grouping view properties.
|
|
@@ -1112,25 +1593,37 @@ module Xlsxrb
|
|
|
1112
1593
|
# @param summary_below [Boolean, nil] Flag indicating if summary rows appear below detail rows.
|
|
1113
1594
|
# @param summary_right [Boolean, nil] Flag indicating if summary columns appear to the right of detail columns.
|
|
1114
1595
|
# @param show_outline_symbols [Boolean, nil] Flag indicating whether outline symbols are visible.
|
|
1115
|
-
# @param show_symbols [Boolean, nil]
|
|
1596
|
+
# @param show_symbols [Boolean, nil] Deprecated alias for show_outline_symbols.
|
|
1116
1597
|
# @param apply_styles [Boolean, nil] Flag indicating whether automatic styles apply to outlines.
|
|
1117
1598
|
# @param opts [Hash] Additional options.
|
|
1118
|
-
# @return [Hash]
|
|
1599
|
+
# @return [Hash<Symbol, untyped>, void]
|
|
1119
1600
|
# @api public
|
|
1120
|
-
# : (?summary_below: bool?, ?summary_right: bool?, ?show_outline_symbols: bool?, ?show_symbols: bool?, ?apply_styles: bool?, **untyped opts) -> Hash[Symbol, untyped]
|
|
1121
|
-
def outline_properties: (?summary_below:
|
|
1601
|
+
# : (?summary_below: bool?, ?summary_right: bool?, ?show_outline_symbols: bool?, ?show_symbols: bool?, ?apply_styles: bool?, **untyped opts) -> (Hash[Symbol, untyped] | void)
|
|
1602
|
+
def outline_properties: (?summary_below: untyped, ?summary_right: untyped, ?show_outline_symbols: untyped, ?show_symbols: untyped, ?apply_styles: untyped, **untyped opts) -> untyped
|
|
1122
1603
|
|
|
1604
|
+
# @deprecated Use {#outline_properties} instead. Will be removed in 0.2.0.
|
|
1123
1605
|
alias outline_pr outline_properties
|
|
1124
1606
|
|
|
1607
|
+
# Sets worksheet outline and grouping view properties.
|
|
1608
|
+
#
|
|
1609
|
+
# @param opts [Hash] Outline properties.
|
|
1610
|
+
# @return [void]
|
|
1611
|
+
# @api public
|
|
1612
|
+
# : (Hash[Symbol, untyped] opts) -> void
|
|
1613
|
+
def outline_properties=: (Hash[Symbol, untyped] opts) -> void
|
|
1614
|
+
|
|
1615
|
+
alias outline_pr= outline_properties=
|
|
1616
|
+
|
|
1125
1617
|
# Adds a chart to the current worksheet.
|
|
1126
1618
|
#
|
|
1619
|
+
# @param type [Symbol, String, nil] Optional chart type (e.g. :bar, :line).
|
|
1127
1620
|
# @param options [Hash] Chart options.
|
|
1128
1621
|
# @yield [builder]
|
|
1129
1622
|
# @yieldparam builder [Xlsxrb::ChartBuilder]
|
|
1130
1623
|
# @return [void]
|
|
1131
1624
|
# @api public
|
|
1132
|
-
# : (**untyped options) ?{ (ChartBuilder) -> void } -> void
|
|
1133
|
-
def chart: (**untyped options) ?{ (ChartBuilder) -> void } -> void
|
|
1625
|
+
# : (?Symbol | String? type, **untyped options) ?{ (ChartBuilder) -> void } -> void
|
|
1626
|
+
def chart: (?Symbol | String? type, **untyped options) ?{ (ChartBuilder) -> void } -> void
|
|
1134
1627
|
|
|
1135
1628
|
# Adds a hyperlink on a cell.
|
|
1136
1629
|
#
|
|
@@ -1146,11 +1639,19 @@ module Xlsxrb
|
|
|
1146
1639
|
|
|
1147
1640
|
# Sets the auto-filter range on the active sheet.
|
|
1148
1641
|
#
|
|
1149
|
-
# @param range [String] Cell range (e.g. "A1:E100").
|
|
1642
|
+
# @param range [String, nil] Cell range (e.g. "A1:E100").
|
|
1150
1643
|
# @return [void]
|
|
1151
1644
|
# @api public
|
|
1152
|
-
# : (String range) -> void
|
|
1153
|
-
def auto_filter: (String range) -> void
|
|
1645
|
+
# : (String? range) -> void
|
|
1646
|
+
def auto_filter: (String? range) -> void
|
|
1647
|
+
|
|
1648
|
+
# Sets the auto-filter range for the current worksheet.
|
|
1649
|
+
#
|
|
1650
|
+
# @param range [String, nil] Cell range (e.g. "A1:E100").
|
|
1651
|
+
# @return [String, nil]
|
|
1652
|
+
# @api public
|
|
1653
|
+
# : (String? range) -> String?
|
|
1654
|
+
def auto_filter=: (String? range) -> String?
|
|
1154
1655
|
|
|
1155
1656
|
# Sets filter criteria on a column in the auto-filter.
|
|
1156
1657
|
#
|
|
@@ -1158,27 +1659,45 @@ module Xlsxrb
|
|
|
1158
1659
|
# @param filter [Hash] Filter criteria.
|
|
1159
1660
|
# @return [void]
|
|
1160
1661
|
# @api public
|
|
1161
|
-
#
|
|
1162
|
-
|
|
1662
|
+
# Sets filter criteria on an auto-filter column.
|
|
1663
|
+
#
|
|
1664
|
+
# @param col_id [Integer, String, Symbol] 0-based column index relative to auto-filter or column letter ("A", :B).
|
|
1665
|
+
# @param filter [Hash] Filter definition.
|
|
1666
|
+
# @return [void]
|
|
1667
|
+
# @api public
|
|
1668
|
+
# : (Integer | String | Symbol col_id, Hash[untyped, untyped] filter) -> void
|
|
1669
|
+
def filter_column: (Integer | String | Symbol col_id, Hash[untyped, untyped] filter) -> void
|
|
1163
1670
|
|
|
1164
1671
|
# Configures column sort state on the active sheet.
|
|
1165
1672
|
#
|
|
1166
1673
|
# @param ref [String] The sorted range.
|
|
1167
1674
|
# @param sort_conditions [Array<Hash>] Sort conditions.
|
|
1168
1675
|
# @param opts [Hash] Additional options.
|
|
1676
|
+
# @return [Elements::SortState, Hash<Symbol, untyped>, nil, void]
|
|
1677
|
+
# @api public
|
|
1678
|
+
# : (?String? ref, ?Array[Hash[untyped, untyped]]? sort_conditions, **untyped opts) -> (untyped | void)
|
|
1679
|
+
def sort_state: (?untyped ref, ?untyped sort_conditions, **untyped opts) -> untyped
|
|
1680
|
+
|
|
1681
|
+
# Sets column sort state for the sheet.
|
|
1682
|
+
#
|
|
1683
|
+
# @param opts [Elements::SortState, Hash, nil] Sort state options.
|
|
1169
1684
|
# @return [void]
|
|
1170
1685
|
# @api public
|
|
1171
|
-
# : (untyped
|
|
1172
|
-
def sort_state
|
|
1686
|
+
# : (untyped opts) -> void
|
|
1687
|
+
def sort_state=: (untyped opts) -> void
|
|
1173
1688
|
|
|
1174
1689
|
# Adds a data validation rule.
|
|
1175
1690
|
#
|
|
1176
1691
|
# @param sqref [String, nil] Cell range.
|
|
1177
|
-
# @param opts [Hash] Validation options (or coordinate keywords: `columns:`, `rows:`, `except_rows:`, `in:`).
|
|
1692
|
+
# @param opts [Hash] Validation options (or coordinate keywords: `columns:`, `rows:`, `except_rows:`, `list:`, `in:`).
|
|
1178
1693
|
# @yield [data_validation_builder] Optional configuration block.
|
|
1179
1694
|
# @return [void]
|
|
1180
1695
|
# @api public
|
|
1181
1696
|
# : (?String? sqref, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
1697
|
+
def data_validation: (?String? sqref, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
1698
|
+
|
|
1699
|
+
# @deprecated Use {#data_validation} instead.
|
|
1700
|
+
# : (?String? sqref, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
1182
1701
|
def validate_data: (?String? sqref, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
1183
1702
|
|
|
1184
1703
|
# Adds a conditional formatting rule.
|
|
@@ -1213,16 +1732,18 @@ module Xlsxrb
|
|
|
1213
1732
|
# @param source_ref [String] Source data range.
|
|
1214
1733
|
# @param row_fields [Array<Integer>] 0-based field indices for rows.
|
|
1215
1734
|
# @param data_fields [Array<Hash>] Data fields.
|
|
1216
|
-
# @param
|
|
1217
|
-
# @param
|
|
1735
|
+
# @param column_fields [Array<Integer>] 0-based field indices for columns.
|
|
1736
|
+
# @param col_fields [Array<Integer>] Deprecated alias for column_fields.
|
|
1737
|
+
# @param ref [String] Top-left destination cell (default: "E1").
|
|
1738
|
+
# @param dest_ref [String] Deprecated alias for ref.
|
|
1218
1739
|
# @param name [String, nil] Pivot table name.
|
|
1219
1740
|
# @param field_names [Array<String>, nil] Override field names.
|
|
1220
1741
|
# @param items [Array, nil] Items configuration.
|
|
1221
1742
|
# @param opts [Hash] Additional options.
|
|
1222
1743
|
# @return [void]
|
|
1223
1744
|
# @api public
|
|
1224
|
-
# : (untyped source_ref, row_fields: untyped, data_fields: untyped, ?col_fields: untyped, ?dest_ref: untyped, ?name: untyped, ?field_names: untyped, ?items: untyped, **untyped opts) -> void
|
|
1225
|
-
def pivot_table: (untyped source_ref, row_fields: untyped, data_fields: untyped, ?col_fields: untyped, ?dest_ref: untyped, ?name: untyped, ?field_names: untyped, ?items: untyped, **untyped opts) -> void
|
|
1745
|
+
# : (untyped source_ref, row_fields: untyped, data_fields: untyped, ?column_fields: untyped, ?col_fields: untyped, ?ref: untyped, ?dest_ref: untyped, ?name: untyped, ?field_names: untyped, ?items: untyped, **untyped opts) -> void
|
|
1746
|
+
def pivot_table: (untyped source_ref, row_fields: untyped, data_fields: untyped, ?column_fields: untyped, ?col_fields: untyped, ?ref: untyped, ?dest_ref: untyped, ?name: untyped, ?field_names: untyped, ?items: untyped, **untyped opts) -> void
|
|
1226
1747
|
|
|
1227
1748
|
# Adds a comment to a cell.
|
|
1228
1749
|
#
|
|
@@ -1250,6 +1771,7 @@ module Xlsxrb
|
|
|
1250
1771
|
# : (String | Integer cell, String text, ?author: untyped, ?timestamp: untyped, ?id: String?, ?parent_id: String?, ?done: bool?, ?user_id: String?, ?provider_id: String?) -> void
|
|
1251
1772
|
def threaded_comment: (String | Integer cell, String text, ?author: untyped, ?timestamp: untyped, ?id: String?, ?parent_id: String?, ?done: bool?, ?user_id: String?, ?provider_id: String?) -> void
|
|
1252
1773
|
|
|
1774
|
+
# @deprecated Use {#threaded_comment} instead. Will be removed in 0.2.0.
|
|
1253
1775
|
alias add_threaded_comment threaded_comment
|
|
1254
1776
|
|
|
1255
1777
|
# Adds a sparkline group.
|
|
@@ -1277,6 +1799,7 @@ module Xlsxrb
|
|
|
1277
1799
|
# @param range [String, nil] Data range for the sparkline (e.g. "A1:E1").
|
|
1278
1800
|
# @param type [Symbol, String, nil] Sparkline type (:line, :column, :win_loss / :stacked).
|
|
1279
1801
|
# @param opts [Hash] Additional sparkline options.
|
|
1802
|
+
# @deprecated Use {#sparkline_group} instead. Will be removed in 0.2.0.
|
|
1280
1803
|
# @return [void]
|
|
1281
1804
|
# @api public
|
|
1282
1805
|
# : (?location: String?, ?range: String?, ?type: (String | Symbol)?, **untyped opts) -> void
|
|
@@ -1284,6 +1807,10 @@ module Xlsxrb
|
|
|
1284
1807
|
|
|
1285
1808
|
# Merges a range of cells into a single cell.
|
|
1286
1809
|
#
|
|
1810
|
+
# @example
|
|
1811
|
+
# sheet.merge("A1:C1")
|
|
1812
|
+
#
|
|
1813
|
+
# @deprecated Passing coordinate keyword arguments (row:, col_start:, col_end:, row_start:, row_end:) is deprecated and will be removed in 0.2.0. Use a range string (e.g. merge("A1:C1")) instead.
|
|
1287
1814
|
# @param range [String, Hash, nil] Cell range (e.g. "A1:B2") or hash of coordinates.
|
|
1288
1815
|
# @param row [Integer, nil] Single row index.
|
|
1289
1816
|
# @param col_start [Integer, String, nil] Starting column.
|
|
@@ -1295,36 +1822,70 @@ module Xlsxrb
|
|
|
1295
1822
|
# : (?(String | Hash[Symbol, Integer | String])? range, ?row: Integer?, ?col_start: (Integer | String)?, ?col_end: (Integer | String)?, ?row_start: Integer?, ?row_end: Integer?) -> void
|
|
1296
1823
|
def merge: (?(String | Hash[Symbol, Integer | String])? range, ?row: Integer?, ?col_start: (Integer | String)?, ?col_end: (Integer | String)?, ?row_start: Integer?, ?row_end: Integer?) -> void
|
|
1297
1824
|
|
|
1298
|
-
# Freezes window panes at the given row and column.
|
|
1825
|
+
# Freezes window panes at the given row and column, or queries freeze pane settings.
|
|
1826
|
+
#
|
|
1827
|
+
# @param row [Integer, nil] Number of rows to freeze.
|
|
1828
|
+
# @param column [Integer, String, nil] Number of columns to freeze.
|
|
1829
|
+
# @param col [Integer, String, nil] Deprecated alias for column.
|
|
1830
|
+
# @return [Elements::FreezePane, Hash<Symbol, untyped>, nil, void]
|
|
1831
|
+
# @api public
|
|
1832
|
+
# : (?row: Integer | nil, ?column: (Integer | String)?, ?col: (Integer | String)?) -> (untyped | void)
|
|
1833
|
+
def freeze_pane: (?row: untyped, ?column: untyped, ?col: untyped) -> untyped
|
|
1834
|
+
|
|
1835
|
+
# Sets or clears freeze pane configuration.
|
|
1299
1836
|
#
|
|
1300
|
-
# @param
|
|
1301
|
-
# @param col [Integer, String] Number of columns to freeze.
|
|
1837
|
+
# @param opts [Elements::FreezePane, Hash, nil] Freeze pane options.
|
|
1302
1838
|
# @return [void]
|
|
1303
1839
|
# @api public
|
|
1304
|
-
# : (
|
|
1305
|
-
def freeze_pane
|
|
1840
|
+
# : (untyped opts) -> void
|
|
1841
|
+
def freeze_pane=: (untyped opts) -> void
|
|
1306
1842
|
|
|
1307
|
-
# Splits window panes without freezing.
|
|
1843
|
+
# Splits window panes without freezing or queries split pane settings.
|
|
1308
1844
|
#
|
|
1309
|
-
# @param x_split [Integer] Horizontal split in points.
|
|
1310
|
-
# @param y_split [Integer] Vertical split in points.
|
|
1845
|
+
# @param x_split [Integer, nil] Horizontal split in points.
|
|
1846
|
+
# @param y_split [Integer, nil] Vertical split in points.
|
|
1311
1847
|
# @param top_left_cell [String, nil] Top-left cell reference in bottom-right pane.
|
|
1848
|
+
# @param active_pane [String, Symbol, nil] Active pane identifier.
|
|
1849
|
+
# @param state [String, Symbol, nil] Split state.
|
|
1850
|
+
# @return [Elements::SplitPane, Hash<Symbol, untyped>, nil, void]
|
|
1851
|
+
# @api public
|
|
1852
|
+
# : (?x_split: Integer | nil, ?y_split: Integer | nil, ?top_left_cell: String?, ?active_pane: (String | Symbol)?, ?state: (String | Symbol)?) -> (untyped | void)
|
|
1853
|
+
def split_pane: (?x_split: untyped, ?y_split: untyped, ?top_left_cell: untyped, ?active_pane: untyped, ?state: untyped) -> untyped
|
|
1854
|
+
|
|
1855
|
+
# Sets or clears split pane configuration.
|
|
1856
|
+
#
|
|
1857
|
+
# @param opts [Elements::SplitPane, Hash, nil] Split pane options.
|
|
1312
1858
|
# @return [void]
|
|
1313
1859
|
# @api public
|
|
1314
|
-
# : (
|
|
1315
|
-
def split_pane
|
|
1860
|
+
# : (untyped opts) -> void
|
|
1861
|
+
def split_pane=: (untyped opts) -> void
|
|
1316
1862
|
|
|
1317
|
-
# Sets the active cell selection on the current sheet.
|
|
1863
|
+
# Sets or queries the active cell selection on the current sheet.
|
|
1318
1864
|
#
|
|
1319
|
-
# @param active_cell [String] Active cell reference (e.g. "A1").
|
|
1865
|
+
# @param active_cell [String, nil] Active cell reference (e.g. "A1") or range (e.g. "A1:D10").
|
|
1320
1866
|
# @param sqref [String, nil] Selection range.
|
|
1321
1867
|
# @param pane [String, Symbol, nil] Target pane.
|
|
1868
|
+
# @return [Elements::Selection, Array<Elements::Selection>, Hash<Symbol, untyped>, nil, void]
|
|
1869
|
+
# @api public
|
|
1870
|
+
# : (?String? active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> (untyped | void)
|
|
1871
|
+
def selection: (?untyped active_cell, ?sqref: untyped, ?pane: untyped) -> untyped
|
|
1872
|
+
|
|
1873
|
+
# Sets or clears the selection configuration.
|
|
1874
|
+
#
|
|
1875
|
+
# @param opts [Elements::Selection, Array<Elements::Selection, Hash>, Hash, nil]
|
|
1322
1876
|
# @return [void]
|
|
1323
1877
|
# @api public
|
|
1878
|
+
# : (untyped opts) -> void
|
|
1879
|
+
def selection=: (untyped opts) -> void
|
|
1880
|
+
|
|
1881
|
+
# @deprecated Use {#selection} instead.
|
|
1324
1882
|
# : (String active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
1325
1883
|
def select_cell: (String active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
1326
1884
|
|
|
1327
|
-
#
|
|
1885
|
+
# Configures page margins for printing (<pageMargins>).
|
|
1886
|
+
#
|
|
1887
|
+
# When called with no arguments, returns the page margins value object or hash.
|
|
1888
|
+
# When called with arguments, configures page margins and returns nil.
|
|
1328
1889
|
#
|
|
1329
1890
|
# @param left [Float, nil] Left margin.
|
|
1330
1891
|
# @param right [Float, nil] Right margin.
|
|
@@ -1332,41 +1893,98 @@ module Xlsxrb
|
|
|
1332
1893
|
# @param bottom [Float, nil] Bottom margin.
|
|
1333
1894
|
# @param header [Float, nil] Header margin.
|
|
1334
1895
|
# @param footer [Float, nil] Footer margin.
|
|
1896
|
+
# @return [Elements::PageMargins, Hash<Symbol, untyped>, nil, void]
|
|
1897
|
+
# @api public
|
|
1898
|
+
# : (?left: Float?, ?right: Float?, ?top: Float?, ?bottom: Float?, ?header: Float?, ?footer: Float?) -> (untyped | void)
|
|
1899
|
+
def page_margins: (?left: untyped, ?right: untyped, ?top: untyped, ?bottom: untyped, ?header: untyped, ?footer: untyped) -> untyped
|
|
1900
|
+
|
|
1901
|
+
# Sets or clears page margins configuration.
|
|
1902
|
+
#
|
|
1903
|
+
# @param opts [Hash, Elements::PageMargins, nil]
|
|
1335
1904
|
# @return [void]
|
|
1336
1905
|
# @api public
|
|
1337
|
-
# : (
|
|
1338
|
-
def page_margins
|
|
1906
|
+
# : (untyped opts) -> void
|
|
1907
|
+
def page_margins=: (untyped opts) -> void
|
|
1339
1908
|
|
|
1340
|
-
#
|
|
1909
|
+
# Configures or queries page setup configuration (<pageSetup>).
|
|
1910
|
+
#
|
|
1911
|
+
# When called with no arguments, returns the page setup value object or hash.
|
|
1912
|
+
# When called with keyword arguments, updates page setup and returns nil.
|
|
1341
1913
|
#
|
|
1342
1914
|
# @param opts [Hash] Page setup options (e.g. orientation: :landscape).
|
|
1915
|
+
# @return [Elements::PageSetup, Hash<Symbol, untyped>, void]
|
|
1916
|
+
# @api public
|
|
1917
|
+
# : (**untyped opts) -> (untyped | void)
|
|
1918
|
+
def page_setup: (**untyped opts) -> untyped
|
|
1919
|
+
|
|
1920
|
+
# Sets page setup configuration.
|
|
1921
|
+
#
|
|
1922
|
+
# @param opts [Hash, Elements::PageSetup]
|
|
1343
1923
|
# @return [void]
|
|
1344
1924
|
# @api public
|
|
1345
|
-
# : (
|
|
1346
|
-
def page_setup
|
|
1925
|
+
# : (untyped opts) -> void
|
|
1926
|
+
def page_setup=: (untyped opts) -> void
|
|
1347
1927
|
|
|
1348
|
-
# Configures headers and footers for printing.
|
|
1928
|
+
# Configures or queries headers and footers for printing (<headerFooter>).
|
|
1929
|
+
#
|
|
1930
|
+
# When called with no arguments, returns the header/footer value object or hash.
|
|
1931
|
+
# When called with keyword arguments, updates headers and footers and returns nil.
|
|
1349
1932
|
#
|
|
1350
1933
|
# @param opts [Hash] Header/footer options.
|
|
1934
|
+
# @return [Elements::HeaderFooter, Hash<Symbol, untyped>, void]
|
|
1935
|
+
# @api public
|
|
1936
|
+
# : (**untyped opts) -> (untyped | void)
|
|
1937
|
+
def header_footer: (**untyped opts) -> untyped
|
|
1938
|
+
|
|
1939
|
+
# Sets header and footer configuration.
|
|
1940
|
+
#
|
|
1941
|
+
# @param opts [Hash, Elements::HeaderFooter]
|
|
1351
1942
|
# @return [void]
|
|
1352
1943
|
# @api public
|
|
1353
|
-
# : (
|
|
1354
|
-
def header_footer
|
|
1944
|
+
# : (untyped opts) -> void
|
|
1945
|
+
def header_footer=: (untyped opts) -> void
|
|
1355
1946
|
|
|
1356
|
-
#
|
|
1947
|
+
# Configures or queries print options (<printOptions>).
|
|
1357
1948
|
#
|
|
1358
|
-
#
|
|
1359
|
-
#
|
|
1949
|
+
# When called with no arguments, returns the {Elements::PrintOptions} value object.
|
|
1950
|
+
# When called with arguments or keyword options, configures print options and returns nil.
|
|
1951
|
+
#
|
|
1952
|
+
# @param name [Symbol, String, Hash, Elements::MetadataRecord, nil] Option name or hash/record of options.
|
|
1953
|
+
# @param value [Object, nil] Option value.
|
|
1954
|
+
# @param opts [Hash] Additional print options.
|
|
1955
|
+
# @return [Elements::PrintOptions, void]
|
|
1956
|
+
# @api public
|
|
1957
|
+
# : (?Symbol | String | Hash[Symbol, untyped] | Elements::MetadataRecord | nil name, ?untyped value, **untyped opts) -> (Elements::PrintOptions | void)
|
|
1958
|
+
def print_options: (?untyped name, ?untyped value, **untyped opts) -> untyped
|
|
1959
|
+
|
|
1960
|
+
# Replaces print options with the given hash or {Elements::PrintOptions} object.
|
|
1961
|
+
#
|
|
1962
|
+
# @param opts [Hash, Elements::PrintOptions]
|
|
1360
1963
|
# @return [void]
|
|
1361
1964
|
# @api public
|
|
1362
|
-
# : (Symbol
|
|
1363
|
-
def print_options
|
|
1965
|
+
# : (Hash[Symbol, untyped] | Elements::PrintOptions opts) -> void
|
|
1966
|
+
def print_options=: (Hash[Symbol, untyped] | Elements::PrintOptions opts) -> void
|
|
1364
1967
|
|
|
1365
|
-
#
|
|
1968
|
+
# Configures or queries sheet-level protection with optional password hashing (<sheetProtection>).
|
|
1969
|
+
#
|
|
1970
|
+
# When called with no arguments, returns the sheet protection value object or hash.
|
|
1971
|
+
# When called with keyword arguments, sets sheet protection and returns nil.
|
|
1366
1972
|
#
|
|
1367
1973
|
# @param opts [Hash] Protection options.
|
|
1974
|
+
# @return [Elements::SheetProtection, Hash<Symbol, untyped>, nil, void]
|
|
1975
|
+
# @api public
|
|
1976
|
+
# : (**untyped opts) -> (untyped | void)
|
|
1977
|
+
def sheet_protection: (**untyped opts) -> untyped
|
|
1978
|
+
|
|
1979
|
+
# Sets or clears sheet protection configuration.
|
|
1980
|
+
#
|
|
1981
|
+
# @param opts [Elements::SheetProtection, Hash, Boolean, nil]
|
|
1368
1982
|
# @return [void]
|
|
1369
1983
|
# @api public
|
|
1984
|
+
# : (untyped opts) -> void
|
|
1985
|
+
def sheet_protection=: (untyped opts) -> void
|
|
1986
|
+
|
|
1987
|
+
# @deprecated Use {#sheet_protection} instead.
|
|
1370
1988
|
# : (**untyped opts) -> void
|
|
1371
1989
|
def protect_sheet: (**untyped opts) -> void
|
|
1372
1990
|
|
|
@@ -1374,15 +1992,17 @@ module Xlsxrb
|
|
|
1374
1992
|
#
|
|
1375
1993
|
# @param file_data [String] Binary image data.
|
|
1376
1994
|
# @param ext [String] File extension ("png", "jpeg", etc.).
|
|
1377
|
-
# @param
|
|
1995
|
+
# @param from_column [Integer, nil] Top-left starting column.
|
|
1996
|
+
# @param from_col [Integer, nil] Deprecated alias for from_column.
|
|
1378
1997
|
# @param from_row [Integer] Top-left starting row.
|
|
1379
|
-
# @param
|
|
1998
|
+
# @param to_column [Integer, nil] Bottom-right ending column.
|
|
1999
|
+
# @param to_col [Integer, nil] Deprecated alias for to_column.
|
|
1380
2000
|
# @param to_row [Integer] Bottom-right ending row.
|
|
1381
2001
|
# @param opts [Hash] Additional options.
|
|
1382
2002
|
# @return [void]
|
|
1383
2003
|
# @api public
|
|
1384
|
-
# : (String file_data, ?ext: ::String, ?from_col: ::Integer
|
|
1385
|
-
def image: (String file_data, ?ext: ::String, ?from_col: ::Integer
|
|
2004
|
+
# : (String file_data, ?ext: ::String, ?from_column: ::Integer?, ?from_col: ::Integer?, ?from_row: ::Integer, ?to_column: ::Integer?, ?to_col: ::Integer?, ?to_row: ::Integer, **untyped opts) -> void
|
|
2005
|
+
def image: (String file_data, ?ext: ::String, ?from_column: ::Integer?, ?from_col: ::Integer?, ?from_row: ::Integer, ?to_column: ::Integer?, ?to_col: ::Integer?, ?to_row: ::Integer, **untyped opts) -> void
|
|
1386
2006
|
|
|
1387
2007
|
# Configures the worksheet background image (<picture>).
|
|
1388
2008
|
#
|
|
@@ -1392,6 +2012,7 @@ module Xlsxrb
|
|
|
1392
2012
|
# @example Set background image from file path
|
|
1393
2013
|
# sheet.background_image("path/to/background.png")
|
|
1394
2014
|
#
|
|
2015
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#background_image=} instead.
|
|
1395
2016
|
# @param file_data [String, Hash, Elements::Image, nil] Image binary data, file path, or image options hash.
|
|
1396
2017
|
# @param ext [String, nil] Image extension ("png", "jpeg", "jpg", "gif", etc.).
|
|
1397
2018
|
# @param opts [Hash] Additional image options.
|
|
@@ -1400,23 +2021,30 @@ module Xlsxrb
|
|
|
1400
2021
|
# : (?untyped file_data, ?ext: ::String?, **untyped opts) -> Hash[Symbol, untyped]?
|
|
1401
2022
|
def background_image: (?untyped file_data, ?ext: ::String?, **untyped opts) -> Hash[Symbol, untyped]?
|
|
1402
2023
|
|
|
2024
|
+
# @deprecated Use {#background_image} instead. Will be removed in 0.2.0.
|
|
1403
2025
|
alias background_picture background_image
|
|
1404
2026
|
|
|
2027
|
+
# @deprecated Use {#background_image} instead. Will be removed in 0.2.0.
|
|
1405
2028
|
alias picture background_image
|
|
1406
2029
|
|
|
2030
|
+
# : (untyped val) -> untyped
|
|
1407
2031
|
def background_image=: (untyped val) -> untyped
|
|
1408
2032
|
|
|
2033
|
+
# @deprecated Use {#background_image=} instead. Will be removed in 0.2.0.
|
|
1409
2034
|
alias background_picture= background_image=
|
|
1410
2035
|
|
|
2036
|
+
# @deprecated Use {#background_image=} instead. Will be removed in 0.2.0.
|
|
1411
2037
|
alias picture= background_image=
|
|
1412
2038
|
|
|
1413
2039
|
# Inserts a drawing shape.
|
|
1414
2040
|
#
|
|
1415
2041
|
# @param preset [String] Preset shape name.
|
|
1416
2042
|
# @param text [String, nil] Label text.
|
|
1417
|
-
# @param
|
|
2043
|
+
# @param from_column [Integer, nil] Top-left column.
|
|
2044
|
+
# @param from_col [Integer, nil] Deprecated alias for from_column.
|
|
1418
2045
|
# @param from_row [Integer] Top-left row.
|
|
1419
|
-
# @param
|
|
2046
|
+
# @param to_column [Integer, nil] Bottom-right column.
|
|
2047
|
+
# @param to_col [Integer, nil] Deprecated alias for to_column.
|
|
1420
2048
|
# @param to_row [Integer] Bottom-right row.
|
|
1421
2049
|
# @param opts [Hash] Additional options.
|
|
1422
2050
|
# @return [void]
|
|
@@ -1426,14 +2054,24 @@ module Xlsxrb
|
|
|
1426
2054
|
|
|
1427
2055
|
# Gets or sets the sheet visibility state (:visible, :hidden, or :very_hidden).
|
|
1428
2056
|
#
|
|
2057
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#state=} instead.
|
|
1429
2058
|
# @param new_state [Symbol, nil] The new state.
|
|
1430
2059
|
# @return [Symbol]
|
|
1431
2060
|
# @api public
|
|
1432
2061
|
# : (?Symbol? new_state) -> Symbol
|
|
1433
2062
|
def state: (?Symbol? new_state) -> Symbol
|
|
1434
2063
|
|
|
2064
|
+
# Sets the sheet visibility state (:visible, :hidden, or :very_hidden).
|
|
2065
|
+
#
|
|
2066
|
+
# @param new_state [Symbol, String] The new state.
|
|
2067
|
+
# @return [Symbol]
|
|
2068
|
+
# @api public
|
|
2069
|
+
# : (Symbol | String new_state) -> Symbol
|
|
2070
|
+
def state=: (Symbol | String new_state) -> Symbol
|
|
2071
|
+
|
|
1435
2072
|
# Gets or sets the tab color of the current worksheet.
|
|
1436
2073
|
#
|
|
2074
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#tab_color=} instead.
|
|
1437
2075
|
# @param spec [String, Hash, Symbol, nil] Tab color hex string or hash options.
|
|
1438
2076
|
# @param opts [Hash] Color keyword arguments (e.g. theme: 1, tint: 0.5).
|
|
1439
2077
|
# @return [String, Hash, nil]
|
|
@@ -1441,51 +2079,109 @@ module Xlsxrb
|
|
|
1441
2079
|
# : (?String | Symbol | Hash[Symbol, untyped] | nil spec, **untyped opts) -> (String | Hash[Symbol, untyped] | nil)
|
|
1442
2080
|
def tab_color: (?String | Symbol | Hash[Symbol, untyped] | nil spec, **untyped opts) -> (String | Hash[Symbol, untyped] | nil)
|
|
1443
2081
|
|
|
1444
|
-
|
|
2082
|
+
# Sets the tab color of the current worksheet.
|
|
2083
|
+
#
|
|
2084
|
+
# @param spec [String, Hash, Symbol, nil] Tab color hex string or hash options.
|
|
2085
|
+
# @return [String, Hash, nil]
|
|
2086
|
+
# @api public
|
|
2087
|
+
# : (String | Symbol | Hash[Symbol, untyped] | nil spec) -> (String | Hash[Symbol, untyped] | nil)
|
|
2088
|
+
def tab_color=: (String | Symbol | Hash[Symbol, untyped] | nil spec) -> (String | Hash[Symbol, untyped] | nil)
|
|
1445
2089
|
|
|
1446
|
-
# Sets a sheet
|
|
2090
|
+
# Sets a single sheet property.
|
|
1447
2091
|
#
|
|
1448
|
-
# @param name [Symbol] Property name.
|
|
2092
|
+
# @param name [Symbol, String] Property name.
|
|
1449
2093
|
# @param value [Object] Property value.
|
|
1450
2094
|
# @return [void]
|
|
1451
2095
|
# @api public
|
|
1452
|
-
# : (Symbol name, untyped value) -> void
|
|
1453
|
-
def
|
|
2096
|
+
# : (Symbol | String name, untyped value) -> void
|
|
2097
|
+
def sheet_property: (Symbol | String name, untyped value) -> void
|
|
2098
|
+
|
|
2099
|
+
# Configures or queries sheet properties (<sheetPr>).
|
|
2100
|
+
#
|
|
2101
|
+
# When called with no arguments, returns the {Elements::SheetProperties} value object.
|
|
2102
|
+
# When called with arguments or keyword options, configures properties and returns nil.
|
|
2103
|
+
#
|
|
2104
|
+
# @param name [Symbol, String, Hash, Elements::MetadataRecord, nil] Property name or hash/record of properties.
|
|
2105
|
+
# @param value [Object, nil] Property value when name is provided.
|
|
2106
|
+
# @param opts [Hash] Additional sheet properties.
|
|
2107
|
+
# @return [Elements::SheetProperties, void]
|
|
2108
|
+
# @api public
|
|
2109
|
+
# : (?Symbol | String | Hash[Symbol, untyped] | Elements::MetadataRecord | nil name, ?untyped value, **untyped opts) -> (Elements::SheetProperties | void)
|
|
2110
|
+
def sheet_properties: (?untyped name, ?untyped value, **untyped opts) -> untyped
|
|
2111
|
+
|
|
2112
|
+
# Replaces worksheet properties with the given hash or {Elements::SheetProperties} object.
|
|
2113
|
+
#
|
|
2114
|
+
# @param opts [Hash, Elements::SheetProperties]
|
|
2115
|
+
# @return [void]
|
|
2116
|
+
# @api public
|
|
2117
|
+
# : (Hash[Symbol, untyped] | Elements::SheetProperties opts) -> void
|
|
2118
|
+
def sheet_properties=: (Hash[Symbol, untyped] | Elements::SheetProperties opts) -> void
|
|
2119
|
+
|
|
2120
|
+
# Configures or queries sheet view display properties (<sheetView>).
|
|
2121
|
+
#
|
|
2122
|
+
# When called with no arguments, returns the {Elements::SheetView} value object.
|
|
2123
|
+
# When called with arguments or keyword options, configures view properties and returns nil.
|
|
2124
|
+
#
|
|
2125
|
+
# @param name [Symbol, String, Hash, Elements::MetadataRecord, nil] View property name or hash/record of properties.
|
|
2126
|
+
# @param value [Object, nil] View property value when name is provided.
|
|
2127
|
+
# @param opts [Hash] Additional view properties.
|
|
2128
|
+
# @return [Elements::SheetView, void]
|
|
2129
|
+
# @api public
|
|
2130
|
+
# : (?Symbol | String | Hash[Symbol, untyped] | Elements::MetadataRecord | nil name, ?untyped value, **untyped opts) -> (Elements::SheetView | void)
|
|
2131
|
+
def sheet_view: (?untyped name, ?untyped value, **untyped opts) -> untyped
|
|
1454
2132
|
|
|
1455
|
-
#
|
|
2133
|
+
# Replaces sheet view properties with the given hash or {Elements::SheetView} object.
|
|
1456
2134
|
#
|
|
1457
|
-
# @param
|
|
1458
|
-
# @param value [Object] View property value.
|
|
2135
|
+
# @param opts [Hash, Elements::SheetView]
|
|
1459
2136
|
# @return [void]
|
|
1460
2137
|
# @api public
|
|
1461
|
-
# : (Symbol
|
|
1462
|
-
def sheet_view
|
|
2138
|
+
# : (Hash[Symbol, untyped] | Elements::SheetView opts) -> void
|
|
2139
|
+
def sheet_view=: (Hash[Symbol, untyped] | Elements::SheetView opts) -> void
|
|
1463
2140
|
|
|
1464
|
-
# Configures sheet format properties (
|
|
2141
|
+
# Configures or queries sheet format properties (<sheetFormatPr>).
|
|
2142
|
+
#
|
|
2143
|
+
# When called with no arguments, returns the {Elements::SheetFormat} value object.
|
|
2144
|
+
# When called with arguments or keyword options, configures format properties and returns nil.
|
|
1465
2145
|
#
|
|
1466
|
-
# @param name [Symbol, String, Hash, nil] Property name or hash of properties.
|
|
2146
|
+
# @param name [Symbol, String, Hash, Elements::MetadataRecord, nil] Property name or hash/record of properties.
|
|
1467
2147
|
# @param value [Object, nil] Property value when name is provided.
|
|
1468
2148
|
# @param opts [Hash] Keyword arguments for sheet format properties.
|
|
1469
|
-
# @return [
|
|
2149
|
+
# @return [Elements::SheetFormat, void]
|
|
2150
|
+
# @api public
|
|
2151
|
+
# : (?Symbol | String | Hash[Symbol, untyped] | Elements::MetadataRecord | nil name, ?untyped value, **untyped opts) -> (Elements::SheetFormat | void)
|
|
2152
|
+
def sheet_format: (?untyped name, ?untyped value, **untyped opts) -> untyped
|
|
2153
|
+
|
|
2154
|
+
# Replaces sheet format properties with the given hash or {Elements::SheetFormat} object.
|
|
2155
|
+
#
|
|
2156
|
+
# @param opts [Hash, Elements::SheetFormat]
|
|
2157
|
+
# @return [void]
|
|
1470
2158
|
# @api public
|
|
1471
|
-
# : (
|
|
1472
|
-
def sheet_format
|
|
2159
|
+
# : (Hash[Symbol, untyped] | Elements::SheetFormat opts) -> void
|
|
2160
|
+
def sheet_format=: (Hash[Symbol, untyped] | Elements::SheetFormat opts) -> void
|
|
1473
2161
|
|
|
1474
|
-
# Inserts a horizontal page break
|
|
2162
|
+
# Inserts a horizontal page break after the given 0-based row.
|
|
1475
2163
|
#
|
|
1476
|
-
# @param
|
|
2164
|
+
# @param row_index [Integer] 0-based row index.
|
|
1477
2165
|
# @return [void]
|
|
1478
2166
|
# @api public
|
|
2167
|
+
# : (Integer row_index) -> void
|
|
2168
|
+
def row_break: (Integer row_index) -> void
|
|
2169
|
+
|
|
2170
|
+
# @deprecated Use {#row_break} instead.
|
|
1479
2171
|
# : (Integer row_num) -> void
|
|
1480
2172
|
def page_break_row: (Integer row_num) -> void
|
|
1481
2173
|
|
|
1482
|
-
# Inserts a vertical page break
|
|
2174
|
+
# Inserts a vertical page break after the given column.
|
|
1483
2175
|
#
|
|
1484
|
-
# @param
|
|
2176
|
+
# @param col [Integer, String, Symbol] 0-based column index or letter ("B", :B).
|
|
1485
2177
|
# @return [void]
|
|
1486
2178
|
# @api public
|
|
1487
|
-
# : (Integer
|
|
1488
|
-
def
|
|
2179
|
+
# : (Integer | String | Symbol col) -> void
|
|
2180
|
+
def column_break: (Integer | String | Symbol col) -> void
|
|
2181
|
+
|
|
2182
|
+
# @deprecated Use {#column_break} instead.
|
|
2183
|
+
# : (Integer | String | Symbol col_index) -> void
|
|
2184
|
+
def page_break_col: (Integer | String | Symbol col_index) -> void
|
|
1489
2185
|
|
|
1490
2186
|
# Adds a protected range to the current sheet.
|
|
1491
2187
|
#
|
|
@@ -1498,6 +2194,7 @@ module Xlsxrb
|
|
|
1498
2194
|
# : (String name, String sqref, ?password: String?, **untyped opts) -> void
|
|
1499
2195
|
def protected_range: (String name, String sqref, ?password: String?, **untyped opts) -> void
|
|
1500
2196
|
|
|
2197
|
+
# @deprecated Use {#protected_range} instead. Will be removed in 0.2.0.
|
|
1501
2198
|
alias add_protected_range protected_range
|
|
1502
2199
|
|
|
1503
2200
|
# Adds a cell watch to the current sheet.
|
|
@@ -1508,6 +2205,7 @@ module Xlsxrb
|
|
|
1508
2205
|
# : (String ref) -> void
|
|
1509
2206
|
def cell_watch: (String ref) -> void
|
|
1510
2207
|
|
|
2208
|
+
# @deprecated Use {#cell_watch} instead. Will be removed in 0.2.0.
|
|
1511
2209
|
alias add_cell_watch cell_watch
|
|
1512
2210
|
|
|
1513
2211
|
# Adds an ignored error entry to the current sheet.
|
|
@@ -1517,9 +2215,15 @@ module Xlsxrb
|
|
|
1517
2215
|
# @return [void]
|
|
1518
2216
|
# @api public
|
|
1519
2217
|
# : (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
2218
|
+
def ignored_error: (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
2219
|
+
|
|
2220
|
+
# @deprecated Use {#ignored_error} instead. Will be removed in 0.2.0.
|
|
2221
|
+
# : (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
1520
2222
|
def ignore_error: (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
1521
2223
|
|
|
1522
|
-
|
|
2224
|
+
# @deprecated Use {#ignored_error} instead. Will be removed in 0.2.0.
|
|
2225
|
+
# : (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
2226
|
+
def add_ignored_error: (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
1523
2227
|
|
|
1524
2228
|
# Returns the ignored error entries configured for the current sheet.
|
|
1525
2229
|
#
|
|
@@ -1530,6 +2234,7 @@ module Xlsxrb
|
|
|
1530
2234
|
|
|
1531
2235
|
# Gets or sets phonetic (furigana) guide properties for the current sheet.
|
|
1532
2236
|
#
|
|
2237
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#phonetic_properties=} instead.
|
|
1533
2238
|
# @overload phonetic_properties()
|
|
1534
2239
|
# Returns the current phonetic properties.
|
|
1535
2240
|
# @return [Hash, nil]
|
|
@@ -1541,28 +2246,44 @@ module Xlsxrb
|
|
|
1541
2246
|
# @param alignment [Symbol, String, nil]
|
|
1542
2247
|
# @return [Hash, nil]
|
|
1543
2248
|
# @api public
|
|
1544
|
-
# : (?
|
|
1545
|
-
def phonetic_properties: (?
|
|
1546
|
-
|
|
1547
|
-
alias phonetic_properties= phonetic_properties
|
|
2249
|
+
# : (?untyped spec, ?font_id: Integer?, ?type: (Symbol | String)?, ?alignment: (Symbol | String)?, **untyped opts) -> (Elements::PhoneticProperties | Hash[Symbol, untyped] | nil)
|
|
2250
|
+
def phonetic_properties: (?untyped spec, ?font_id: Integer?, ?type: (Symbol | String)?, ?alignment: (Symbol | String)?, **untyped opts) -> (Elements::PhoneticProperties | Hash[Symbol, untyped] | nil)
|
|
1548
2251
|
|
|
2252
|
+
# @deprecated Use {#phonetic_properties} instead. Will be removed in 0.2.0.
|
|
1549
2253
|
alias phonetic_pr phonetic_properties
|
|
1550
2254
|
|
|
1551
|
-
|
|
2255
|
+
# Sets phonetic (furigana) guide properties for the current sheet.
|
|
2256
|
+
#
|
|
2257
|
+
# @param spec [Hash, Integer, nil]
|
|
2258
|
+
# @return [Hash[Symbol, untyped], Integer, nil]
|
|
2259
|
+
# @api public
|
|
2260
|
+
# : (Hash[Symbol, untyped] | Integer | nil spec) -> (Hash[Symbol, untyped] | Integer | nil)
|
|
2261
|
+
def phonetic_properties=: (Hash[Symbol, untyped] | Integer | nil spec) -> (Hash[Symbol, untyped] | Integer | nil)
|
|
2262
|
+
|
|
2263
|
+
# @deprecated Use {#phonetic_properties=} instead. Will be removed in 0.2.0.
|
|
2264
|
+
alias phonetic_pr= phonetic_properties=
|
|
1552
2265
|
|
|
1553
2266
|
# Sets or gets the internal code name of the current worksheet (or workbook if no sheet is open).
|
|
1554
2267
|
#
|
|
2268
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#code_name=} instead.
|
|
1555
2269
|
# @param val [String, Symbol, nil] The code name.
|
|
1556
2270
|
# @return [String, nil]
|
|
1557
2271
|
# @api public
|
|
1558
2272
|
# : (?String | Symbol | nil val) -> String?
|
|
1559
2273
|
def code_name: (?String | Symbol | nil val) -> String?
|
|
1560
2274
|
|
|
1561
|
-
|
|
2275
|
+
# Sets the internal code name of the current worksheet (or workbook if no sheet is open).
|
|
2276
|
+
#
|
|
2277
|
+
# @param val [String, Symbol, nil] The code name.
|
|
2278
|
+
# @return [String, nil]
|
|
2279
|
+
# @api public
|
|
2280
|
+
# : (String | Symbol | nil val) -> String?
|
|
2281
|
+
def code_name=: (String | Symbol | nil val) -> String?
|
|
1562
2282
|
|
|
1563
2283
|
# Configures whether page setup fits content to page width/height for the current sheet.
|
|
1564
2284
|
# When enabled, optionally sets fit_to_width and/or fit_to_height on page_setup.
|
|
1565
2285
|
#
|
|
2286
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#fit_to_page=} or {#page_setup} with :fit_to_width/:fit_to_height instead.
|
|
1566
2287
|
# @param enabled [Boolean, nil] Whether to fit to page.
|
|
1567
2288
|
# @param width [Integer, nil] Pages wide to fit to.
|
|
1568
2289
|
# @param height [Integer, nil] Pages tall to fit to.
|
|
@@ -1571,60 +2292,119 @@ module Xlsxrb
|
|
|
1571
2292
|
# : (?bool? enabled, ?width: Integer?, ?height: Integer?) -> (bool | void)
|
|
1572
2293
|
def fit_to_page: (?untyped enabled, ?width: untyped, ?height: untyped) -> untyped
|
|
1573
2294
|
|
|
1574
|
-
|
|
2295
|
+
# @deprecated Use {#fit_to_page} instead. Will be removed in 0.2.0.
|
|
2296
|
+
# @return [Boolean]
|
|
2297
|
+
# @api public
|
|
2298
|
+
# : () -> bool
|
|
2299
|
+
def fit_to_page?: () -> bool
|
|
1575
2300
|
|
|
1576
|
-
|
|
2301
|
+
# Sets whether page setup fits content to page width/height for the current sheet.
|
|
2302
|
+
#
|
|
2303
|
+
# @param enabled [Boolean, nil] Whether to fit to page.
|
|
2304
|
+
# @return [Boolean]
|
|
2305
|
+
# @api public
|
|
2306
|
+
# : (bool? enabled) -> bool?
|
|
2307
|
+
def fit_to_page=: (bool? enabled) -> bool?
|
|
1577
2308
|
|
|
1578
2309
|
# Configures worksheet calculation properties (<sheetCalcPr>) for the current sheet.
|
|
1579
2310
|
#
|
|
1580
2311
|
# @example Instruct Excel to recalculate formulas when loading sheet
|
|
1581
|
-
# w.
|
|
2312
|
+
# w.sheet_calc_properties = { full_calc_on_load: true }
|
|
1582
2313
|
#
|
|
2314
|
+
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#sheet_calc_properties=} instead.
|
|
1583
2315
|
# @param spec [Hash, nil] Calculation properties hash.
|
|
1584
2316
|
# @param full_calc_on_load [Boolean, nil] Whether to recalculate when loading.
|
|
1585
2317
|
# @return [Hash, nil]
|
|
1586
2318
|
# @api public
|
|
1587
|
-
# : (?
|
|
1588
|
-
def
|
|
2319
|
+
# : (?untyped spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
2320
|
+
def sheet_calc_properties: (?untyped spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
2321
|
+
|
|
2322
|
+
# Sets worksheet calculation properties (<sheetCalcPr>) for the current sheet.
|
|
2323
|
+
#
|
|
2324
|
+
# @param spec [Hash, nil] Calculation properties hash.
|
|
2325
|
+
# @return [Hash, nil]
|
|
2326
|
+
# @api public
|
|
2327
|
+
# : (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
2328
|
+
def sheet_calc_properties=: (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
1589
2329
|
|
|
1590
|
-
|
|
2330
|
+
# @deprecated Use {#sheet_calc_properties} instead. Will be removed in 0.2.0.
|
|
2331
|
+
# : (?Hash[Symbol, untyped]? spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
2332
|
+
def sheet_calc_pr: (?Hash[Symbol, untyped]? spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
1591
2333
|
|
|
1592
|
-
|
|
2334
|
+
# @deprecated Use {#sheet_calc_properties} instead. Will be removed in 0.2.0.
|
|
2335
|
+
# : (?Hash[Symbol, untyped]? spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
2336
|
+
def calc_pr: (?Hash[Symbol, untyped]? spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
1593
2337
|
|
|
1594
|
-
|
|
2338
|
+
# @deprecated Use {#sheet_calc_properties=} instead. Will be removed in 0.2.0.
|
|
2339
|
+
# : (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
2340
|
+
def sheet_calc_pr=: (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
2341
|
+
|
|
2342
|
+
# @deprecated Use {#sheet_calc_properties=} instead. Will be removed in 0.2.0.
|
|
2343
|
+
# : (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
2344
|
+
def calc_pr=: (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
1595
2345
|
|
|
1596
2346
|
# Adds a defined name.
|
|
1597
2347
|
#
|
|
1598
2348
|
# @param name [String] The defined name.
|
|
1599
2349
|
# @param value [Object, nil] The formula or value expression.
|
|
1600
|
-
# @param sheet [String, nil]
|
|
2350
|
+
# @param sheet [String, nil] Reference sheet name.
|
|
2351
|
+
# @param scope [String, Symbol, nil] Local scope sheet name or :workbook.
|
|
1601
2352
|
# @param hidden [Boolean] Whether the defined name is hidden.
|
|
1602
|
-
# @param
|
|
2353
|
+
# @param column [Integer, String, nil] Deprecated alias for columns.
|
|
2354
|
+
# @param columns [Integer, String, nil] Column index or letter for coordinate-based reference.
|
|
2355
|
+
# @param col [Integer, String, nil] Deprecated alias for column.
|
|
2356
|
+
# @param row [Integer, Range, nil] Deprecated alias for rows.
|
|
1603
2357
|
# @param rows [Integer, Range, nil] Row or row range (1-based) for coordinate-based reference.
|
|
1604
2358
|
# @param range [String, nil] Cell range reference.
|
|
2359
|
+
# @param ref_sheet [String, nil] Deprecated alias for sheet.
|
|
2360
|
+
# @param local [Boolean] Deprecated alias for scope.
|
|
1605
2361
|
# @return [void]
|
|
1606
2362
|
# @api public
|
|
1607
|
-
# : (String name, ?untyped value, ?sheet: String?, ?hidden: bool, ?col: untyped, ?rows: untyped, ?range: untyped, ?ref_sheet: String?, ?local: bool) -> void
|
|
1608
|
-
def defined_name: (String name, ?untyped value, ?sheet: String?, ?hidden: bool, ?col: untyped, ?rows: untyped, ?range: untyped, ?ref_sheet: String?, ?local: bool) -> void
|
|
2363
|
+
# : (String name, ?untyped value, ?sheet: String?, ?scope: (String | Symbol)?, ?hidden: bool, ?column: untyped, ?columns: untyped, ?col: untyped, ?row: untyped, ?rows: untyped, ?range: untyped, ?ref_sheet: String?, ?local: bool) -> void
|
|
2364
|
+
def defined_name: (String name, ?untyped value, ?sheet: String?, ?scope: (String | Symbol)?, ?hidden: bool, ?column: untyped, ?columns: untyped, ?col: untyped, ?row: untyped, ?rows: untyped, ?range: untyped, ?ref_sheet: String?, ?local: bool) -> void
|
|
1609
2365
|
|
|
1610
|
-
#
|
|
2366
|
+
# Returns workbook-level defined names.
|
|
1611
2367
|
#
|
|
1612
|
-
# @
|
|
2368
|
+
# @return [Array<Elements::DefinedName>]
|
|
2369
|
+
# @api public
|
|
2370
|
+
# : () -> Array[Elements::DefinedName]
|
|
2371
|
+
def defined_names: () -> Array[Elements::DefinedName]
|
|
2372
|
+
|
|
2373
|
+
# Sets or gets the print area for the current or named sheet.
|
|
2374
|
+
#
|
|
2375
|
+
# @param range [String, Object, nil] Cell range (e.g. "A1:G50").
|
|
1613
2376
|
# @param sheet [String, nil] Target sheet name.
|
|
1614
|
-
# @return [void]
|
|
2377
|
+
# @return [String, nil, void]
|
|
1615
2378
|
# @api public
|
|
1616
|
-
# : (
|
|
1617
|
-
def print_area: (
|
|
2379
|
+
# : (?untyped range, ?sheet: String?) -> (String | nil | void)
|
|
2380
|
+
def print_area: (?untyped range, ?sheet: untyped) -> untyped
|
|
1618
2381
|
|
|
1619
|
-
# Sets print
|
|
2382
|
+
# Sets the print area for the current worksheet.
|
|
1620
2383
|
#
|
|
1621
|
-
# @param
|
|
1622
|
-
# @
|
|
2384
|
+
# @param range [String, nil] Cell range (e.g. "A1:G50").
|
|
2385
|
+
# @return [String, nil]
|
|
2386
|
+
# @api public
|
|
2387
|
+
# : (String? range) -> String?
|
|
2388
|
+
def print_area=: (String? range) -> String?
|
|
2389
|
+
|
|
2390
|
+
# Sets or gets print titles for the current or named sheet.
|
|
2391
|
+
#
|
|
2392
|
+
# @param rows [String, Integer, Range, Object, nil] Repeating row range (e.g. "1:2" or 0-based 0..1).
|
|
2393
|
+
# @param columns [String, Integer, Symbol, Range, Object, nil] Repeating column range (e.g. "A:B" or 0..1).
|
|
2394
|
+
# @param cols [String, Integer, Symbol, Range, Object, nil] Deprecated alias for columns.
|
|
1623
2395
|
# @param sheet [String, nil] Target sheet name.
|
|
1624
|
-
# @return [void]
|
|
2396
|
+
# @return [Elements::PrintTitles, nil, void]
|
|
1625
2397
|
# @api public
|
|
1626
|
-
# : (?rows:
|
|
1627
|
-
def print_titles: (?rows:
|
|
2398
|
+
# : (?rows: untyped, ?columns: untyped, ?cols: untyped, ?sheet: String?) -> (Elements::PrintTitles | nil | void)
|
|
2399
|
+
def print_titles: (?rows: untyped, ?columns: untyped, ?cols: untyped, ?sheet: untyped) -> untyped
|
|
2400
|
+
|
|
2401
|
+
# Sets repeating print titles for the current worksheet.
|
|
2402
|
+
#
|
|
2403
|
+
# @param opts [Elements::PrintTitles, Hash, nil] Options with :rows and/or :columns.
|
|
2404
|
+
# @return [Elements::PrintTitles, Hash, nil]
|
|
2405
|
+
# @api public
|
|
2406
|
+
# : (Elements::PrintTitles | Hash[Symbol, untyped] | nil opts) -> (Elements::PrintTitles | Hash[Symbol, untyped] | nil)
|
|
2407
|
+
def print_titles=: (Elements::PrintTitles | Hash[Symbol, untyped] | nil opts) -> (Elements::PrintTitles | Hash[Symbol, untyped] | nil)
|
|
1628
2408
|
|
|
1629
2409
|
# Sets repeating title rows for pagination on the current or named sheet.
|
|
1630
2410
|
#
|
|
@@ -1652,11 +2432,23 @@ module Xlsxrb
|
|
|
1652
2432
|
# : (Integer | String first, ?(Integer | String)? last, ?sheet: String?) -> void
|
|
1653
2433
|
def repeat_columns: (Integer | String first, ?(Integer | String)? last, ?sheet: String?) -> void
|
|
1654
2434
|
|
|
1655
|
-
# Sets workbook protection.
|
|
2435
|
+
# Sets or returns workbook protection settings.
|
|
1656
2436
|
#
|
|
1657
2437
|
# @param opts [Hash] Protection options.
|
|
2438
|
+
# @return [Elements::WorkbookProtection, nil, void]
|
|
2439
|
+
# @api public
|
|
2440
|
+
# : (**String | Integer | bool | nil opts) -> (Elements::WorkbookProtection | nil)
|
|
2441
|
+
def workbook_protection: (**String | Integer | bool | nil opts) -> (Elements::WorkbookProtection | nil)
|
|
2442
|
+
|
|
2443
|
+
# Sets workbook protection settings.
|
|
2444
|
+
#
|
|
2445
|
+
# @param opts [Hash, Elements::MetadataRecord, nil]
|
|
1658
2446
|
# @return [void]
|
|
1659
2447
|
# @api public
|
|
2448
|
+
# : (untyped opts) -> void
|
|
2449
|
+
def workbook_protection=: (untyped opts) -> void
|
|
2450
|
+
|
|
2451
|
+
# @deprecated Use {#workbook_protection} instead.
|
|
1660
2452
|
# : (**String | Integer | bool | nil opts) -> void
|
|
1661
2453
|
def protect_workbook: (**String | Integer | bool | nil opts) -> void
|
|
1662
2454
|
|
|
@@ -1669,6 +2461,13 @@ module Xlsxrb
|
|
|
1669
2461
|
# : (Symbol name, String | Integer | Time value) -> void
|
|
1670
2462
|
def core_property: (Symbol name, String | Integer | Time value) -> void
|
|
1671
2463
|
|
|
2464
|
+
# Returns core document properties.
|
|
2465
|
+
#
|
|
2466
|
+
# @return [Elements::CoreProperties]
|
|
2467
|
+
# @api public
|
|
2468
|
+
# : () -> Elements::CoreProperties
|
|
2469
|
+
def core_properties: () -> Elements::CoreProperties
|
|
2470
|
+
|
|
1672
2471
|
# Sets an app document property.
|
|
1673
2472
|
#
|
|
1674
2473
|
# @param name [Symbol] Property name.
|
|
@@ -1678,6 +2477,13 @@ module Xlsxrb
|
|
|
1678
2477
|
# : (Symbol name, String | Integer | Time value) -> void
|
|
1679
2478
|
def app_property: (Symbol name, String | Integer | Time value) -> void
|
|
1680
2479
|
|
|
2480
|
+
# Returns application document properties.
|
|
2481
|
+
#
|
|
2482
|
+
# @return [Elements::AppProperties]
|
|
2483
|
+
# @api public
|
|
2484
|
+
# : () -> Elements::AppProperties
|
|
2485
|
+
def app_properties: () -> Elements::AppProperties
|
|
2486
|
+
|
|
1681
2487
|
# Sets multiple core and/or app properties.
|
|
1682
2488
|
#
|
|
1683
2489
|
# @param core [Hash, nil] Core properties.
|
|
@@ -1698,6 +2504,13 @@ module Xlsxrb
|
|
|
1698
2504
|
# : (String name, String | Integer | Float | bool | Time value, ?type: ::Symbol) -> void
|
|
1699
2505
|
def custom_property: (String name, String | Integer | Float | bool | Time value, ?type: ::Symbol) -> void
|
|
1700
2506
|
|
|
2507
|
+
# Returns custom document properties.
|
|
2508
|
+
#
|
|
2509
|
+
# @return [Hash<String, Elements::CustomProperty>]
|
|
2510
|
+
# @api public
|
|
2511
|
+
# : () -> Hash[String, Elements::CustomProperty]
|
|
2512
|
+
def custom_properties: () -> Hash[String, Elements::CustomProperty]
|
|
2513
|
+
|
|
1701
2514
|
# Finalizes and writes all streaming sheet contents to the destination target.
|
|
1702
2515
|
#
|
|
1703
2516
|
# @return [void]
|
|
@@ -1708,7 +2521,7 @@ module Xlsxrb
|
|
|
1708
2521
|
# Explicitly cleans up any resources if not already closed.
|
|
1709
2522
|
#
|
|
1710
2523
|
# @return [void]
|
|
1711
|
-
# @api
|
|
2524
|
+
# @api private
|
|
1712
2525
|
# : () -> void
|
|
1713
2526
|
def cleanup!: () -> void
|
|
1714
2527
|
|